⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.mail

Interface MultipartDataSource

All Superinterfaces:
DataSource


public interface MultipartDataSource
implements DataSource

MultipartDataSource is a DataSource that contains body parts. This allows "mail aware" DataContentHandlers to be implemented more efficiently by being aware of such DataSources and using the appropriate methods to access BodyParts.

Note that the data of a MultipartDataSource is also available as an input stream.

This interface will typically be implemented by providers that preparse multipart bodies, for example an IMAP provider.

Author:
See Also:
DataSource

Method Summary

BodyPart

getBodyPart(int index)

Get the specified Part.

int

getCount()

Return the number of enclosed BodyPart objects.

Method Details

getBodyPart

public BodyPart getBodyPart(int index)

Get the specified Part. Parts are numbered starting at 0.

Parameters:
index - the index of the desired Part
Throws:
- if the given index is out of range.

getCount

public int getCount()

Return the number of enclosed BodyPart objects.