|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Multipart javax.mail.internet.MimeMultipart
public class MimeMultipart
Field Summary | |
---|---|
protected DataSource |
ds
DataSource that provides our InputStream. |
protected boolean |
parsed
Indicates if the data has been parsed. |
Fields inherited from class javax.mail.Multipart |
---|
contentType, parent, parts |
Constructor Summary | |
---|---|
MimeMultipart()
Create an empty MimeMultipart with content type "multipart/mixed" |
|
MimeMultipart(DataSource dataSource)
Create a MimeMultipart from the supplied DataSource. |
|
MimeMultipart(String subtype)
Create an empty MimeMultipart with the subtype supplied. |
Method Summary | |
---|---|
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. |
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 DataSource ds
protected boolean parsed
Constructor Detail |
---|
public MimeMultipart()
public MimeMultipart(String subtype)
subtype
- the subtypepublic MimeMultipart(DataSource dataSource) throws MessagingException
dataSource
- the DataSource to use
MessagingException
Method Detail |
---|
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 get
MessagingException
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 to
IOException
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
public boolean isComplete() throws MessagingException
MessagingException
public String getPreamble() throws MessagingException
MessagingException
public void setPreamble(String preamble) throws MessagingException
preamble
- The new boundary text. This is complete lines of text, including
new lines.
MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |