1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 3 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 4 */ 5 6 package javax.xml.bind.annotation; 7 8 import java.lang.annotation.Retention; 9 import java.lang.annotation.Target; 10 import java.awt.*; 11 import static java.lang.annotation.RetentionPolicy.RUNTIME; 12 import static java.lang.annotation.ElementType.FIELD; 13 import static java.lang.annotation.ElementType.METHOD; 14 import static java.lang.annotation.ElementType.TYPE; 15 16 import javax.xml.transform.Source; 17 import javax.xml.bind.attachment.AttachmentMarshaller; 18 import javax.activation.DataHandler; 19 20 /** 21 * Disable consideration of XOP encoding for datatypes that are bound to 22 * base64-encoded binary data in XML. 23 * 24 * <p> 25 * When XOP encoding is enabled as described in {@link AttachmentMarshaller#isXOPPackage()}, this annotation disables datatypes such as {@link Image} or {@link Source} or <tt>byte[]</tt> that are bound to base64-encoded binary from being considered for 26 * XOP encoding. If a JAXB property is annotated with this annotation or if 27 * the JAXB property's base type is annotated with this annotation, 28 * neither 29 * {@link AttachmentMarshaller#addMtomAttachment(DataHandler, String, String)} 30 * nor 31 * {@link AttachmentMarshaller#addMtomAttachment(byte[], int, int, String, String, String)} is 32 * ever called for the property. The binary data will always be inlined. 33 * 34 * @author Joseph Fialli 35 * @since JAXB2.0 36 */ 37 @Retention(RUNTIME) 38 @Target({FIELD,METHOD,TYPE}) 39 public @interface XmlInlineBinaryData { 40 } 41