public interface MultipartDataSource extends DataSource
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.
DataSource
Modifier and Type | Method and Description |
---|---|
MimeBodyPart |
getBodyPart(int index)
Get the specified MimeBodyPart.
|
int |
getCount()
Return the number of enclosed MimeBodyPart objects.
|
getContentType, getInputStream, getName, getOutputStream
int getCount()
MimeBodyPart getBodyPart(int index) throws MessagingException
index
- the index of the desired MimeBodyPartIndexOutOfBoundsException
- if the given index
is out of range.MessagingException
- thrown in case of errorCopyright © 2021 JBoss by Red Hat. All rights reserved.