|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.Multipart
javax.mail.internet.MimeMultipart
A MIME multipart container.
The default multipart subtype is "mixed". However, an application can
construct a MIME multipart object of any subtype using the
MimeMultipart(String)
constructor.
Field Summary | |
protected javax.activation.DataSource |
ds
The data source supplying the multipart data. |
protected boolean |
parsed
Indicates whether the data from the input stream has been parsed yet. |
Fields inherited from class javax.mail.Multipart |
contentType, parent, parts |
Constructor Summary | |
MimeMultipart()
Constructor for an empty MIME multipart of type "multipart/mixed". |
|
MimeMultipart(javax.activation.DataSource ds)
Constructor with a given data source. |
|
MimeMultipart(java.lang.String subtype)
Constructor for an empty MIME multipart of the given subtype. |
Method Summary | |
protected InternetHeaders |
createInternetHeaders(java.io.InputStream is)
Creates headers from the specified input stream. |
protected MimeBodyPart |
createMimeBodyPart(java.io.InputStream is)
Creates a MIME body part 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. |
BodyPart |
getBodyPart(int index)
Returns the specified body part. |
BodyPart |
getBodyPart(java.lang.String CID)
Returns the body part identified by the given Content-ID (CID). |
int |
getCount()
Returns the number of component body parts. |
protected void |
parse()
Parses the body parts from this multipart's data source. |
void |
setSubType(java.lang.String subtype)
Sets the subtype. |
protected void |
updateHeaders()
Updates the headers of this part to be consistent with its content. |
void |
writeTo(java.io.OutputStream os)
Writes this multipart to the specified output stream. |
Methods inherited from class javax.mail.Multipart |
addBodyPart, addBodyPart, getContentType, getParent, removeBodyPart, removeBodyPart, setMultipartDataSource, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.activation.DataSource ds
protected boolean parsed
Constructor Detail |
public MimeMultipart()
public MimeMultipart(java.lang.String subtype)
public MimeMultipart(javax.activation.DataSource ds) throws MessagingException
ds
- the data source, which can be a MultipartDataSourceMethod Detail |
public void setSubType(java.lang.String subtype) throws MessagingException
MessagingException
public int getCount() throws MessagingException
getCount
in class Multipart
MessagingException
public BodyPart getBodyPart(int index) throws MessagingException
getBodyPart
in class Multipart
index
- the body part index
MessagingException
- if no such part existspublic BodyPart getBodyPart(java.lang.String CID) throws MessagingException
CID
- the Content-ID of the desired part
MessagingException
protected void updateHeaders() throws MessagingException
MessagingException
public void writeTo(java.io.OutputStream os) throws java.io.IOException, MessagingException
writeTo
in class Multipart
java.io.IOException
MessagingException
protected void parse() throws MessagingException
MessagingException
protected InternetHeaders createInternetHeaders(java.io.InputStream is) throws MessagingException
is
- the input stream to read the headers from
MessagingException
protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content) throws MessagingException
headers
- the part headerscontent
- the part content
MessagingException
protected MimeBodyPart createMimeBodyPart(java.io.InputStream is) throws MessagingException
is
- the input stream to parse the part from
MessagingException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |