public abstract class AttachmentUnmarshaller extends Object
使JAXB解组合包含优化的二进制数据格式的根文档。
该API可实现JAXB 2.0实现和基于MIME的包处理器(MTOM / XOP和WS-I AP 1.0)之间的优化二进制数据格式的高效协作处理。 JAXB解包一个包的正文,将对所使用的打包格式的理解委托给实现此抽象类的基于MIME的包处理器。
 该抽象类标识一个包是否需要XOP处理, isXOPPackage()并提供通过content-id存储为附件的二进制内容的检索。 
getAttachment*(String cid) | Constructor and Description | 
|---|
| AttachmentUnmarshaller() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract byte[] | getAttachmentAsByteArray(String cid)
              检索由content-id标识的 
              cid,cid,作为 
             byte[] | 
| abstract DataHandler | getAttachmentAsDataHandler(String cid) 
             根据content-id查找MIME内容,  cid,并作为DataHandler返回。 | 
| boolean | isXOPPackage()
              只读属性,如果JAXB解组器需要执行XOP处理,则返回true。 
             | 
public abstract DataHandler getAttachmentAsDataHandler(String cid)
 根据content-id查找MIME内容, cid ,并作为DataHandler返回。 
 返回的DataHandler实例必须配置为满足以下所需的映射constaint。 
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 Schema xs:anyURI数据类型的有效词汇表。 
            如果isXOPPackage() ==truecid: URI方案的有效URI(参见RFC 2387 ) 
           DataHandler。 
           IllegalArgumentException - 如果找不到给定cid的附件。 
           public abstract byte[] getAttachmentAsByteArray(String cid)
 检索由content-id标识的cid , cid ,作为byte[] 
cid - 预计是XML Schema xs:anyURI数据类型的有效词汇表。 
            如果isXOPPackage() ==truecid: URI方案的有效URI(见RFC 2387 ) 
           IllegalArgumentException - 如果找不到给定cid的附件。 
           public boolean isXOPPackage()
只读属性,如果JAXB解组器需要执行XOP处理,则返回true。
 当满足Identifying XOP Documents中指定的 true时,此方法返回true 。 在解组过程中,此值不能更改。 
 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.