|
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.
|
|
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[]
|
getContentLanguage()
Get the languages specified in the Content-Language header
of this MimePart.
|
|
String
|
getContentMD5()
Return the value of the "Content-MD5" header field.
|
|
InputStream
|
getContentStream()
Produce the raw bytes of the content.
|
|
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
|
getDescription()
Returns the "Content-Description" header field of this body part.
|
|
String
|
getDisposition()
Returns the value of 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.
|
|
String
|
getHeader(String name, String delimiter)
Get all the headers for this header name, returned as a single
String, with headers separated by the delimiter.
|
|
InputStream
|
getInputStream()
Return a decoded input stream for this body part's "content".
|
|
int
|
getLineCount()
Return the number of lines for the content of this Part.
|
|
Enumeration
|
getMatchingHeaderLines(String[] names)
Get matching header lines as an Enumeration of Strings.
|
|
Enumeration
|
getMatchingHeaders(String[] names)
Return matching headers from this Message as an Enumeration of
Header objects.
|
|
Enumeration
|
getNonMatchingHeaderLines(String[] names)
Get non-matching header lines as an Enumeration of Strings.
|
|
Enumeration
|
getNonMatchingHeaders(String[] names)
Return non-matching headers from this Message as an
Enumeration of Header objects.
|
|
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? This method
compares only the primaryType and
subType.
|
|
void
|
removeHeader(String name)
Remove all headers with this name.
|
|
void
|
saveFile(String file)
Save the contents of this part in the specified file.
|
|
void
|
saveFile(File 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
|
setContentLanguage(String[] languages)
Set the Content-Language header of this MimePart.
|
|
void
|
setContentMD5(String md5)
Set the "Content-MD5" 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, String charset)
Set the "Content-Description" header field for this body part.
|
|
void
|
setDescription(String description)
Set the "Content-Description" header field for this body part.
|
|
void
|
setDisposition(String disposition)
Set 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, 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
|
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
|
updateHeaders()
Examine the content of this body part and update the appropriate
MIME headers.
|
|
void
|
writeTo(OutputStream os)
Output the body part as an RFC 822 format stream.
|