MultipartDataSource is aDataSource
that contains body parts. This allows "mail aware"DataContentHandlers
to be implemented more efficiently by being aware of suchDataSources
and using the appropriate methods to accessBodyParts
.
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.
DataSource
getBodyPart(int index) Get the specified Part. | |
getCount() Return the number of enclosed BodyPart objects. |
Methods inherited from interface javax.activation.DataSource |
getContentType,getInputStream,getName,getOutputStream |
public intgetCount()
publicBodyPartgetBodyPart(int index) throwsMessagingException
index
- the index of the desired Partjava.lang.IndexOutOfBoundsException
- if the given indexis out of range.MessagingException
-