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(String subtype)
Create an empty MimeMultipart with the subtype supplied.
|
| Modifier and Type | Method and Description |
|---|---|
protected InternetHeaders |
createInternetHeaders(InputStream in) |
protected MimeBodyPart |
createMimeBodyPart(InputStream in) |
protected MimeBodyPart |
createMimeBodyPart(InternetHeaders headers,
byte[] data) |
BodyPart |
getBodyPart(int part)
Get the specified part; numbering starts at zero.
|
BodyPart |
getBodyPart(String cid) |
int |
getCount()
Return the number of enclosed parts
|
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(String preamble)
Set the message preamble text.
|
void |
setSubType(String subtype) |
protected void |
updateHeaders() |
void |
writeTo(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(String subtype)
subtype - the subtypepublic MimeMultipart(javax.activation.DataSource dataSource)
throws MessagingException
dataSource - the DataSource to useMessagingExceptionpublic void setSubType(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(String cid) throws MessagingException
MessagingExceptionprotected void updateHeaders()
throws MessagingException
MessagingExceptionpublic void writeTo(OutputStream out) throws IOException, MessagingException
MultipartwriteTo in class Multipartout - the stream to write toIOExceptionMessagingExceptionprotected void parse()
throws MessagingException
MessagingExceptionprotected InternetHeaders createInternetHeaders(InputStream in) throws MessagingException
MessagingExceptionprotected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] data) throws MessagingException
MessagingExceptionprotected MimeBodyPart createMimeBodyPart(InputStream in) throws MessagingException
MessagingExceptionpublic boolean isComplete()
throws MessagingException
MessagingExceptionpublic String getPreamble() throws MessagingException
MessagingExceptionpublic void setPreamble(String preamble) throws MessagingException
preamble - The new boundary text. This is complete lines of text, including
new lines.MessagingExceptionCopyright © 2013. All Rights Reserved.