public interface Attachment
Modifier and Type | Method and Description |
---|---|
void |
dispose()
called to denote that this attachment is not needed anymore and used resources can be released.
|
byte[] |
getAsBytes()
get attachment content as a byte array.
|
byte[] |
getAsBytes(int length)
get start of attachment content as byte[].
|
java.io.InputStream |
getAsStream()
get attachment content for streaming.
|
java.lang.String |
getName() |
long |
size()
get size of attachments.
|
java.lang.String getName()
long size()
byte[] getAsBytes()
AttachmentException
- if attachment content could not be read to byte array (if not in memory already) or if it is big to fit
in byte[]byte[] getAsBytes(int length)
AttachmentException
- if attachment content could not be read to byte array (if not in memory already).java.io.InputStream getAsStream()
AttachmentException
- if no stream could be created.void dispose()