|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.mail Interface MultipartDataSource
- All Superinterfaces:
- DataSource
public interface MultipartDataSource
- extends DataSource
MultipartDataSource 是包含正文部分的
DataSource。此接口可以感知此类 DataSources 并使用适当的方法访问 BodyParts,能更有效地实现“邮件感知的”DataContentHandlers。 注意,MultipartDataSource 的数据也可以用作输入流。
此接口通常由预先解析 multipart 正文的提供者实现,例如 IMAP 提供者。
| version | 1.8, 07/05/04 |
| See also | javax.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.8, 07/05/04
- Author:
- John Mani
- See Also:
DataSource
| Method Summary | |
|---|---|
BodyPart |
getBodyPart(int index)
Get the specified Part. |
int |
getCount()
Return the number of enclosed BodyPart objects. |
| Methods inherited from interface javax.activation.DataSource |
|---|
getContentType, getInputStream, getName, getOutputStream |
| Method Detail |
|---|
public int
getCount()
返回封闭 BodyPart 对象的数量。
| return | 部分数 |
getCount
int getCount()
- Return the number of enclosed BodyPart objects.
- Returns:
- number of parts
public BodyPart
getBodyPart(int index) throws MessagingException
获取指定的 Part。Part 是从 0 开始编号的。
| index | 所需 Part 的索引 |
| return | Part |
| Throws | IndexOutOfBoundsException: 如果给定索引超出范围。 |
| Throws | MessagingException: |
getBodyPart
BodyPart getBodyPart(int index) throws MessagingException
- 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
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!