public abstract class AttachmentUnmarshaller extends Object
使用JAXB解包含有优化的二进制数据格式的根文件。
这个API可以有效优化的二进制数据格式和MIME JAXB 2实现基于包处理器之间的协同处理(MTOM / XOP和WS-I AP 1)。JAXB解封包的身体,把包装格式用于MIME基础包处理器实现该抽象类的理解。
这个抽象类标识如果包需要isXOPPackage() XOP处理,并提供存储附件的content-id.二进制内容检索
getAttachment*(String cid)ref:swaRef Section 4.4 Referencing Attachments from the SOAP Envelope| Constructor and Description |
|---|
AttachmentUnmarshaller() |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
getAttachmentAsByteArray(String cid)
检索附件的内容ID,确定
cid,作为
byte[]
|
abstract DataHandler |
getAttachmentAsDataHandler(String cid)
查找MIME内容的内容ID,
cid,返回一个
DataHandler。
|
boolean |
isXOPPackage()
只读属性,返回true如果JAXB配置需要执行XOP处理。
|
public abstract DataHandler getAttachmentAsDataHandler(String cid)
查找MIME内容的内容ID,cid,返回一个DataHandler。
返回的DataHandler实例的配置必须满足以下要求的映射约束。
| Required Mappings between MIME and Java Types | |
|---|---|
| MIME Type | Java Type |
DataHandler.getContentType() |
instanceof DataHandler.getContent() |
| image/gif | java.awt.Image |
| image/jpeg | java.awt.Image |
| text/xml or application/xml | javax.xml.transform.Source |
cid -预计将是一个有效的词汇表的XML架构数据类型
xs:anyURI。如果
isXOPPackage() ==true,必须每
cid: URI方案有效的URI(见
RFC 2387)
DataHandler表示MIME附件。
IllegalArgumentException如果给定CID附件未发现。
public abstract byte[] getAttachmentAsByteArray(String cid)
检索附件的内容ID,确定cid,作为byte[]
cid -预计将是一个有效的词汇表的XML架构数据类型
xs:anyURI。如果
isXOPPackage() ==true,必须每
cid: URI方案有效的URI(见
RFC 2387)
IllegalArgumentException如果给定CID附件未发现。
public boolean isXOPPackage()
只读属性,返回true如果JAXB配置需要执行XOP处理。
此方法返回时,在true指定Identifying XOP Documents满足约束。这个值必须不解包过程中的变化。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.