public class MimeMultipart extends Multipart
| Modifier and Type | Field and Description |
|---|---|
protected javax.activation.DataSource |
ds
DataSource that provides our InputStream.
|
protected boolean |
parsed
Indicates if the data has been parsed.
|
contentType, parent, parts| Constructor and Description |
|---|
MimeMultipart()
Create an empty MimeMultipart with content type "multipart/mixed"
|
MimeMultipart(javax.activation.DataSource dataSource)
Create a MimeMultipart from the supplied DataSource.
|
MimeMultipart(java.lang.String subtype)
Create an empty MimeMultipart with the subtype supplied.
|
| Modifier and Type | Method and Description |
|---|---|
protected InternetHeaders |
createInternetHeaders(java.io.InputStream in) |
protected MimeBodyPart |
createMimeBodyPart(java.io.InputStream in) |
protected MimeBodyPart |
createMimeBodyPart(InternetHeaders headers,
byte[] data) |
BodyPart |
getBodyPart(int part)
Get the specified part; numbering starts at zero.
|
BodyPart |
getBodyPart(java.lang.String cid) |
int |
getCount()
Return the number of enclosed parts
|
java.lang.String |
getPreamble()
Returns the preamble text that appears before the first bady
part of a MIME multi part.
|
boolean |
isComplete()
Return true if the final boundary line for this multipart was
seen when parsing the data.
|
protected void |
parse() |
void |
setPreamble(java.lang.String preamble)
Set the message preamble text.
|
void |
setSubType(java.lang.String subtype) |
protected void |
updateHeaders() |
void |
writeTo(java.io.OutputStream out)
Encode and write this multipart to the supplied OutputStream; the encoding
used is determined by the implementation.
|
addBodyPart, addBodyPart, getContentType, getParent, removeBodyPart, removeBodyPart, setMultipartDataSource, setParentprotected javax.activation.DataSource ds
protected boolean parsed
public MimeMultipart()
public MimeMultipart(java.lang.String subtype)
subtype - the subtypepublic MimeMultipart(javax.activation.DataSource dataSource)
throws MessagingException
dataSource - the DataSource to useMessagingExceptionpublic void setSubType(java.lang.String subtype)
throws MessagingException
MessagingExceptionpublic int getCount()
throws MessagingException
MultipartgetCount in class MultipartMessagingExceptionpublic BodyPart getBodyPart(int part) throws MessagingException
MultipartgetBodyPart in class Multipartpart - the part to getMessagingExceptionpublic BodyPart getBodyPart(java.lang.String cid) throws MessagingException
MessagingExceptionprotected void updateHeaders()
throws MessagingException
MessagingExceptionpublic void writeTo(java.io.OutputStream out)
throws java.io.IOException,
MessagingException
MultipartwriteTo in class Multipartout - the stream to write tojava.io.IOExceptionMessagingExceptionprotected void parse()
throws MessagingException
MessagingExceptionprotected InternetHeaders createInternetHeaders(java.io.InputStream in) throws MessagingException
MessagingExceptionprotected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] data) throws MessagingException
MessagingExceptionprotected MimeBodyPart createMimeBodyPart(java.io.InputStream in) throws MessagingException
MessagingExceptionpublic boolean isComplete()
throws MessagingException
MessagingExceptionpublic java.lang.String getPreamble()
throws MessagingException
MessagingExceptionpublic void setPreamble(java.lang.String preamble)
throws MessagingException
preamble - The new boundary text. This is complete lines of text, including
new lines.MessagingException