XmlInlineBinaryData (Java EE 5)

Java EE API


javax.xml.bind.annotation Annotation Type XmlInlineBinaryData


@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD,TYPE})
public @interface XmlInlineBinaryData

Implements: Annotation
@Retention(value=RUNTIME)
@Target(value={FIELD, METHOD, TYPE})

禁止对绑定到 XML 中 base64-encoded 二进制数据的数据类型进行 XOP 编码。

当启用 XOP 编码时(如 isXOPPackage() 中所述),此注释禁用绑定到 base64-encoded 二进制数据的数据类型(如 ImageSourcebyte[]),从而防止对它们进行 XOP 编码。如果 JAXB 属性使用此注释进行注释,或者 JAXB 属性的基本类型使用此注释进行注释,那么永远不会对该属性调用 addMtomAttachment(DataHandler, String, String)addMtomAttachment(byte[], int, int, String, String, String)。二进制数据将总是被内联。

英文文档:

Disable consideration of XOP encoding for datatypes that are bound to base64-encoded binary data in XML.

When XOP encoding is enabled as described in AttachmentMarshaller.isXOPPackage(), this annotation disables datatypes such as Image or Source or byte[] that are bound to base64-encoded binary from being considered for XOP encoding. If a JAXB property is annotated with this annotation or if the JAXB property's base type is annotated with this annotation, neither AttachmentMarshaller.addMtomAttachment(DataHandler, String, String) nor AttachmentMarshaller.addMtomAttachment(byte[], int, int, String, String, String) is ever called for the property. The binary data will always be inlined.

Since:
JAXB2.0
Author:
Joseph Fialli



Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!