public interface

MultipartDataSource

implements DataSource
com.google.code.javax.mail.MultipartDataSource
Known Indirect Subclasses

Class Overview

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.

See Also
  • javax.activation.DataSource

Summary

Public Methods
abstract BodyPart getBodyPart(int index)
Get the specified Part.
abstract int getCount()
Return the number of enclosed BodyPart objects.
[Expand]
Inherited Methods
From interface com.google.code.javax.activation.DataSource

Public Methods

public abstract BodyPart getBodyPart (int index)

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

Parameters
index The index of the desired Part
Returns
  • the Part
Throws
IndexOutOfBoundsException if the given index is out of range.
MessagingException

public abstract int getCount ()

Return the number of enclosed BodyPart objects.

Returns
  • number of parts