| java.lang.Object net.suberic.pooka.Attachment
All known Subclasses: net.suberic.pooka.crypto.KeyAttachment, net.suberic.pooka.crypto.SignedAttachment, net.suberic.pooka.MBPAttachment, net.suberic.pooka.AlternativeAttachment, net.suberic.pooka.crypto.CryptoAttachment,
Attachment | public class Attachment (Code) | | |
Constructor Summary | |
public | Attachment(MimePart mp) Creates an Attachment out of a MimeBodyPart. | public | Attachment(MimePart mp, MimePart headerSource) Creates an Attachment with the given MimeBodyPart, but with
the attached MimePart as the source for the Headers. |
Method Summary | |
public Object | getContent() Returns the content of this attachment as an Object. | public DataHandler | getDataHandler() Returns the DataHandler for this Attachment. | public String | getEncoding() | public StringBuffer | getHeaderInformation(boolean showFullHeaders) This returns the formatted header information for a message. | public InternetHeaders | getHeaders() Returns the Headers for this Attachment. | public String | getHtml(boolean withHeaders, boolean showFullHeaders, int maxLength, String truncationMessage) Returns the html of the Attachment, up to maxLength bytes. | public InputStream | getInputStream() Returns the decoded InputStream of this Attachment. | public ContentType | getMimeType() | public String | getName() | public int | getSize() | public String | getText(boolean withHeaders, boolean showFullHeaders, int maxLength, String truncationMessage) Returns the text of the Attachment, up to maxLength bytes. | String | getText(int maxLength, String truncationMessage) Returns the String content of this message, up to maxLength
bytes. | public boolean | isHtml() | public boolean | isPlainText() | public boolean | isText() | public void | setHeaderSource(MimePart headerSource) Creates an Attachment out of a MimeMessage. | public void | setHeaderSource(AttachmentBundle bundle) |
headers | InternetHeaders headers(Code) | | |
mimeType | ContentType mimeType(Code) | | |
Attachment | public Attachment(MimePart mp) throws MessagingException(Code) | | Creates an Attachment out of a MimeBodyPart.
|
Attachment | public Attachment(MimePart mp, MimePart headerSource) throws MessagingException(Code) | | Creates an Attachment with the given MimeBodyPart, but with
the attached MimePart as the source for the Headers.
|
getDataHandler | public DataHandler getDataHandler()(Code) | | Returns the DataHandler for this Attachment.
|
getHeaderInformation | public StringBuffer getHeaderInformation(boolean showFullHeaders)(Code) | | This returns the formatted header information for a message.
|
getHeaders | public InternetHeaders getHeaders()(Code) | | Returns the Headers for this Attachment.
|
getHtml | public String getHtml(boolean withHeaders, boolean showFullHeaders, int maxLength, String truncationMessage) throws java.io.IOException(Code) | | Returns the html of the Attachment, up to maxLength bytes. If
the content is truncated, then append the truncationMessage at the
end of the content displayed.
If withHeaders is set, then show the Headers to go with this message.
If showFullHeaders is also set, then show all the headers.
|
getMimeType | public ContentType getMimeType()(Code) | | |
getSize | public int getSize()(Code) | | |
getText | public String getText(boolean withHeaders, boolean showFullHeaders, int maxLength, String truncationMessage) throws java.io.IOException(Code) | | Returns the text of the Attachment, up to maxLength bytes. If
the content is truncated, then append the truncationMessage at the
end of the content displayed.
If withHeaders is set, then show the Headers to go with this message.
If showFullHeaders is also set, then show all the headers.
|
getText | String getText(int maxLength, String truncationMessage) throws IOException(Code) | | Returns the String content of this message, up to maxLength
bytes.
|
isHtml | public boolean isHtml()(Code) | | |
isPlainText | public boolean isPlainText()(Code) | | |
isText | public boolean isText()(Code) | | |
setHeaderSource | public void setHeaderSource(MimePart headerSource) throws MessagingException(Code) | | Creates an Attachment out of a MimeMessage. This is typically
used when the content of a Message is too large to display, and
therefore it needs to be treated as an attachment rather than
as the text of the Message.
|
|
|