Example usage for Java javax.mail.internet MimeBodyPart fields, constructors, methods, implement or subclass
The text is from its open source code.
MimeBodyPart() An empty MimeBodyPart object is created. | |
MimeBodyPart(InputStream is) Constructs a MimeBodyPart by reading and parsing the data from the specified input stream. | |
MimeBodyPart(InternetHeaders headers, byte[] content) Constructs a MimeBodyPart using the given header and content bytes. |
void | addHeader(String name, String value) Add this value to the existing values for this header_name. |
void | addHeaderLine(String line) Add a header line to this body part |
void | attachFile(File file) Use the specified file to provide the data for this part. |
void | attachFile(String file) Use the specified file to provide the data for this part. |
boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. |
Enumeration | getAllHeaderLines() Get all header lines as an Enumeration of Strings. |
Enumeration | getAllHeaders() Return all the headers from this Message as an Enumeration of Header objects. |
Object | getContent() Return the content as a Java object. |
String | getContentID() Returns the value of the "Content-ID" header field. |
String | getContentType() Returns the value of the RFC 822 "Content-Type" header field. |
DataHandler | getDataHandler() Return a DataHandler for this body part's content. |
String | getDisposition() Returns the disposition from the "Content-Disposition" header field. |
String | getEncoding() Returns the content transfer encoding from the "Content-Transfer-Encoding" header field. |
String | getFileName() Get the filename associated with this body part. |
String[] | getHeader(String name) Get all the headers for this header_name. |
InputStream | getInputStream() Return a decoded input stream for this body part's "content". |
InputStream | getRawInputStream() Return an InputStream to the raw data with any Content-Transfer-Encoding intact. |
int | getSize() Return the size of the content of this body part in bytes. |
boolean | isMimeType(String mimeType) Is this Part of the specified MIME type? |
void | removeHeader(String name) Remove all headers with this name. |
void | saveFile(File file) Save the contents of this part in the specified file. |
void | saveFile(String file) Save the contents of this part in the specified file. |
void | setContent(Object o, String type) A convenience method for setting this body part's content. |
void | setContent(Multipart mp) This method sets the body part's content to a Multipart object. |
void | setContentID(String cid) Set the "Content-ID" header field of this body part. |
void | setDataHandler(DataHandler dh) This method provides the mechanism to set this body part's content. |
void | setDescription(String description) Set the "Content-Description" header field for this body part. |
void | setDescription(String description, String charset) Set the "Content-Description" header field for this body part. |
void | setDisposition(String disposition) Set the disposition in the "Content-Disposition" header field of this body part. |
void | setFileName(String filename) Set the filename associated with this body part, if possible. |
void | setHeader(String name, String value) Set the value for this header_name. |
void | setText(String text) Convenience method that sets the given String as this part's content, with a MIME type of "text/plain". |
void | setText(String text, String charset) Convenience method that sets the given String as this part's content, with a MIME type of "text/plain" and the specified charset. |
void | setText(String text, String charset, String subtype) Convenience method that sets the given String as this part's content, with a primary MIME type of "text" and the specified MIME subtype. |
void | writeTo(OutputStream os) Output the body part as an RFC 822 format stream. |