public interface Attachment
MimeMessageMimeMessage.getAttachments(),
MimeMessage.addAttachment(java.lang.String, java.io.File)| Modifier and Type | Method and Description |
|---|---|
String |
getContentId()
Returns the content identifier of the attachment.
|
String |
getContentType()
Returns the content type of the attachment.
|
DataHandler |
getDataHandler()
Returns the data handler of the attachment.
|
InputStream |
getInputStream()
Return an
InputStream to read the contents of the attachment from. |
long |
getSize()
Returns the size of the attachment in bytes.
|
String getContentId()
null if empty or not definedString getContentType()
null if empty or not definedInputStream getInputStream() throws IOException
InputStream to read the contents of the attachment from. The user is responsible for
closing the stream.IOException - in case of access I/O errorslong getSize()
-1 if the size cannot be determined.0 if empty, or -1 if the size cannot be determinedDataHandler getDataHandler()