接口 MimeContainer
public interface MimeContainer
Represents a container for MIME attachments Concrete implementations might adapt a SOAPMessage or an email message.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
- 另请参阅:
- XML-binary Optimized Packaging
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidaddAttachment(String contentId, DataHandler dataHandler)Add the given data handler as an attachment to this container.booleanconvertToXopPackage()Turn this message into a XOP package.DataHandlergetAttachment(String contentId)Return the attachment with the given content id, ornullif not found.booleanisXopPackage()Indicate whether this container is a XOP package.
方法详细资料
isXopPackage
boolean isXopPackage()
Indicate whether this container is a XOP package.- 返回:
truewhen the constraints specified in Identifying XOP Documents are met- 另请参阅:
- XOP Packages
convertToXopPackage
boolean convertToXopPackage()
Turn this message into a XOP package.- 返回:
truewhen the message actually is a XOP package- 另请参阅:
- XOP Packages
addAttachment
void addAttachment(String contentId, DataHandler dataHandler)
Add the given data handler as an attachment to this container.- 参数:
contentId- the content id of the attachmentdataHandler- the data handler containing the data of the attachment
getAttachment
DataHandler getAttachment(String contentId)
Return the attachment with the given content id, ornullif not found.- 参数:
contentId- the content id- 返回:
- the attachment, as a data handler