javax.mail
接口 MultipartDataSource

所有超级接口:
DataSource
所有已知实现类:
IMAPMultipartDataSource

public interface MultipartDataSource
extends 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.

版本:
1.8, 07/05/04
作者:
John Mani
另请参见:
DataSource

方法摘要
 BodyPart getBodyPart(int index)
          Get the specified Part.
 int getCount()
          Return the number of enclosed BodyPart objects.
 
从接口 javax.activation.DataSource 继承的方法
getContentType, getInputStream, getName, getOutputStream
 

方法详细信息

getCount

int getCount()
Return the number of enclosed BodyPart objects.

返回:
number of parts

getBodyPart

BodyPart getBodyPart(int index)
                     throws MessagingException
Get the specified Part. Parts are numbered starting at 0.

参数:
index - the index of the desired Part
返回:
the Part
抛出:
IndexOutOfBoundsException - if the given index is out of range.
MessagingException


Copyright © 2013. All Rights Reserved.