Package com.jk.core.mail
Class Attachment
java.lang.Object
com.jk.core.mail.Attachment
This class provides attributes and methods necessary for the mail
attachments.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
This enum specifies the available MimeTypes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getData()
This method gets the attachment data.This method gets the attachment description.This method gets the attachment the mime type.getName()
This method gets the attachment name.void
setData
(byte[] data) This method sets the attachment data to the provided value.void
setData
(InputStream in) This method sets the attachment data from an input stream.void
setDescription
(String description) This method sets the attachment description.void
setMimeType
(String mimeType) This method sets the mime type to the specified value.void
This method sets the attachment name.
-
Constructor Details
-
Attachment
public Attachment()
-
-
Method Details
-
getData
public byte[] getData()This method gets the attachment data.- Returns:
- the attachment data.
-
getDescription
This method gets the attachment description.- Returns:
- the attachment description.
-
getMimeType
This method gets the attachment the mime type.- Returns:
- the mime type
-
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
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
This method sets the attachment description.- Parameters:
description
- Specifies the new description.
-
setMimeType
This method sets the mime type to the specified value.- Parameters:
mimeType
- Specifies the new mime type.
-
setName
This method sets the attachment name.- Parameters:
name
- Specifies the new attachment name.
-