javax.mail.internet

Class MimeMultipart

public class MimeMultipart extends Multipart

Field Summary
protected DataSourceds
DataSource that provides our InputStream.
protected booleanparsed
Indicates if the data has been parsed.
Constructor Summary
MimeMultipart()
Create an empty MimeMultipart with content type "multipart/mixed"
MimeMultipart(String subtype)
Create an empty MimeMultipart with the subtype supplied.
MimeMultipart(DataSource dataSource)
Create a MimeMultipart from the supplied DataSource.
Method Summary
protected InternetHeaderscreateInternetHeaders(InputStream in)
protected MimeBodyPartcreateMimeBodyPart(InternetHeaders headers, byte[] data)
protected MimeBodyPartcreateMimeBodyPart(InputStream in)
BodyPartgetBodyPart(int part)
BodyPartgetBodyPart(String cid)
intgetCount()
protected voidparse()
voidsetSubType(String subtype)
protected voidupdateHeaders()
voidwriteTo(OutputStream out)

Field Detail

ds

protected DataSource ds
DataSource that provides our InputStream.

parsed

protected boolean parsed
Indicates if the data has been parsed.

Constructor Detail

MimeMultipart

public MimeMultipart()
Create an empty MimeMultipart with content type "multipart/mixed"

MimeMultipart

public MimeMultipart(String subtype)
Create an empty MimeMultipart with the subtype supplied.

Parameters: subtype the subtype

MimeMultipart

public MimeMultipart(DataSource dataSource)
Create a MimeMultipart from the supplied DataSource.

Parameters: dataSource the DataSource to use

Throws: MessagingException

Method Detail

createInternetHeaders

protected InternetHeaders createInternetHeaders(InputStream in)

createMimeBodyPart

protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] data)

createMimeBodyPart

protected MimeBodyPart createMimeBodyPart(InputStream in)

getBodyPart

public BodyPart getBodyPart(int part)

getBodyPart

public BodyPart getBodyPart(String cid)

getCount

public int getCount()

parse

protected void parse()

setSubType

public void setSubType(String subtype)

updateHeaders

protected void updateHeaders()

writeTo

public void writeTo(OutputStream out)