javax.mail.internet
public class MimeMultipart extends Multipart
The default multipart subtype is "mixed". However, an application can
construct a MIME multipart object of any subtype using the
MimeMultipart(String)
constructor.
Version: 1.4
Field Summary | |
---|---|
protected DataSource | ds
The data source supplying the multipart data. |
protected boolean | parsed
Indicates whether the data from the input stream has been parsed yet. |
Constructor Summary | |
---|---|
MimeMultipart()
Constructor for an empty MIME multipart of type "multipart/mixed". | |
MimeMultipart(String subtype)
Constructor for an empty MIME multipart of the given subtype. | |
MimeMultipart(DataSource ds)
Constructor with a given data source. |
Method Summary | |
---|---|
protected InternetHeaders | createInternetHeaders(InputStream is)
Creates headers from the specified input stream. |
protected MimeBodyPart | createMimeBodyPart(InternetHeaders headers, byte[] content)
Creates a MIME body part object from the given headers and byte content. |
protected MimeBodyPart | createMimeBodyPart(InputStream is)
Creates a MIME body part from the specified input stream. |
BodyPart | getBodyPart(int index)
Returns the specified body part.
|
BodyPart | getBodyPart(String CID)
Returns the body part identified by the given Content-ID (CID). |
int | getCount()
Returns the number of component body parts. |
String | getPreamble()
Returns the preamble text (if any) before the first boundary line in
this multipart's body. |
boolean | isComplete()
Indicates whether the final boundary line for this multipart has been
parsed. |
protected void | parse()
Parses the body parts from this multipart's data source. |
void | setPreamble(String preamble)
Sets the preamble text to be emitted before the first boundary line. |
void | setSubType(String subtype)
Sets the subtype. |
protected void | updateHeaders()
Updates the headers of this part to be consistent with its content. |
void | writeTo(OutputStream os)
Writes this multipart to the specified output stream.
|
Parameters: ds the data source, which can be a MultipartDataSource
Parameters: is the input stream to read the headers from
Parameters: headers the part headers content the part content
Parameters: is the input stream to parse the part from
Parameters: index the body part index
Throws: MessagingException if no such part exists
Parameters: CID the Content-ID of the desired part
Since: JavaMail 1.4
Since: JavaMail 1.4
Parameters: preamble the preamble text
Since: JavaMail 1.4