Class Attachment

java.lang.Object
com.jk.core.mail.Attachment

public class Attachment extends Object
This class provides attributes and methods necessary for the mail attachments.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • Attachment

      public Attachment()
  • Method Details

    • getData

      public byte[] getData()
      This method gets the attachment data.
      Returns:
      the attachment data.
    • getDescription

      public String getDescription()
      This method gets the attachment description.
      Returns:
      the attachment description.
    • getMimeType

      public String getMimeType()
      This method gets the attachment the mime type.
      Returns:
      the mime type
    • getName

      public String getName()
      This method gets the attachment name.
      Returns:
      the attachment name.
    • setData

      public void setData(byte[] data)
      This method sets the attachment data to the provided value.
      Parameters:
      data - Specifies the new data.
    • setData

      public void setData(InputStream in) throws IOException
      This method sets the attachment data from an input stream.
      Parameters:
      in - Specifies the new attachment data input stream.
      Throws:
      IOException - if an I/O exception has occurred.
    • setDescription

      public void setDescription(String description)
      This method sets the attachment description.
      Parameters:
      description - Specifies the new description.
    • setMimeType

      public void setMimeType(String mimeType)
      This method sets the mime type to the specified value.
      Parameters:
      mimeType - Specifies the new mime type.
    • setName

      public void setName(String name)
      This method sets the attachment name.
      Parameters:
      name - Specifies the new attachment name.