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
|
protected void |
parse() |
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, setParent
protected 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 useMessagingException
public void setSubType(String subtype) throws MessagingException
MessagingException
public int getCount() throws MessagingException
Multipart
getCount
in class Multipart
MessagingException
public BodyPart getBodyPart(int part) throws MessagingException
Multipart
getBodyPart
in class Multipart
part
- the part to getMessagingException
public BodyPart getBodyPart(String cid) throws MessagingException
MessagingException
protected void updateHeaders() throws MessagingException
MessagingException
public void writeTo(OutputStream out) throws IOException, MessagingException
Multipart
writeTo
in class Multipart
out
- the stream to write toIOException
MessagingException
protected void parse() throws MessagingException
MessagingException
protected InternetHeaders createInternetHeaders(InputStream in) throws MessagingException
MessagingException
protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] data) throws MessagingException
MessagingException
protected MimeBodyPart createMimeBodyPart(InputStream in) throws MessagingException
MessagingException
Copyright © 2013. All Rights Reserved.