Java javax.mail.internet MimeBodyPart fields, constructors, methods, implement or subclass

Example usage for Java javax.mail.internet MimeBodyPart fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.mail.internet MimeBodyPart.

The text is from its open source code.

Subclass

javax.mail.internet.MimeBodyPart has subclasses.
Click this link to see all its subclasses.

Constructor

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.

Method

voidaddHeader(String name, String value)
Add this value to the existing values for this header_name.
voidaddHeaderLine(String line)
Add a header line to this body part
voidattachFile(File file)
Use the specified file to provide the data for this part.
voidattachFile(String file)
Use the specified file to provide the data for this part.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
EnumerationgetAllHeaderLines()
Get all header lines as an Enumeration of Strings.
Enumeration
getAllHeaders()
Return all the headers from this Message as an Enumeration of Header objects.
ObjectgetContent()
Return the content as a Java object.
StringgetContentID()
Returns the value of the "Content-ID" header field.
StringgetContentType()
Returns the value of the RFC 822 "Content-Type" header field.
DataHandlergetDataHandler()
Return a DataHandler for this body part's content.
StringgetDisposition()
Returns the disposition from the "Content-Disposition" header field.
StringgetEncoding()
Returns the content transfer encoding from the "Content-Transfer-Encoding" header field.
StringgetFileName()
Get the filename associated with this body part.
String[]getHeader(String name)
Get all the headers for this header_name.
InputStreamgetInputStream()
Return a decoded input stream for this body part's "content".
InputStreamgetRawInputStream()
Return an InputStream to the raw data with any Content-Transfer-Encoding intact.
intgetSize()
Return the size of the content of this body part in bytes.
booleanisMimeType(String mimeType)
Is this Part of the specified MIME type?
voidremoveHeader(String name)
Remove all headers with this name.
voidsaveFile(File file)
Save the contents of this part in the specified file.
voidsaveFile(String file)
Save the contents of this part in the specified file.
voidsetContent(Object o, String type)
A convenience method for setting this body part's content.
voidsetContent(Multipart mp)
This method sets the body part's content to a Multipart object.
voidsetContentID(String cid)
Set the "Content-ID" header field of this body part.
voidsetDataHandler(DataHandler dh)
This method provides the mechanism to set this body part's content.
voidsetDescription(String description)
Set the "Content-Description" header field for this body part.
voidsetDescription(String description, String charset)
Set the "Content-Description" header field for this body part.
voidsetDisposition(String disposition)
Set the disposition in the "Content-Disposition" header field of this body part.
voidsetFileName(String filename)
Set the filename associated with this body part, if possible.
voidsetHeader(String name, String value)
Set the value for this header_name.
voidsetText(String text)
Convenience method that sets the given String as this part's content, with a MIME type of "text/plain".
voidsetText(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.
voidsetText(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.
voidwriteTo(OutputStream os)
Output the body part as an RFC 822 format stream.