Module com.sun.xml.messaging.saaj
Interface MultipartDataSource
- All Superinterfaces:
- jakarta.activation.DataSource
public interface MultipartDataSource
extends jakarta.activation.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.
- Version:
- 1.6, 02/03/27
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptiongetBodyPart(int index) Get the specified MimeBodyPart.intgetCount()Return the number of enclosed MimeBodyPart objects.Methods inherited from interface jakarta.activation.DataSourcegetContentType, getInputStream, getName, getOutputStream
- 
Method Details- 
getCountint getCount()Return the number of enclosed MimeBodyPart objects.- Returns:
- number of parts
 
- 
getBodyPartGet the specified MimeBodyPart. Parts are numbered starting at 0.- Parameters:
- index- the index of the desired MimeBodyPart
- Returns:
- the MimeBodyPart
- Throws:
- IndexOutOfBoundsException- if the given index is out of range.
- MessagingException- thrown in case of error
 
 
-