< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlInlineBinaryData.java

Print this page




  24  */
  25 
  26 package javax.xml.bind.annotation;
  27 
  28 import java.lang.annotation.Retention;
  29 import java.lang.annotation.Target;
  30 import static java.lang.annotation.RetentionPolicy.RUNTIME;
  31 import static java.lang.annotation.ElementType.FIELD;
  32 import static java.lang.annotation.ElementType.METHOD;
  33 import static java.lang.annotation.ElementType.TYPE;
  34 
  35 import javax.xml.transform.Source;
  36 import javax.xml.bind.attachment.AttachmentMarshaller;
  37 import javax.activation.DataHandler;
  38 
  39 /**
  40  * Disable consideration of XOP encoding for datatypes that are bound to
  41  * base64-encoded binary data in XML.
  42  *
  43  * <p>
  44  * When XOP encoding is enabled as described in {@link AttachmentMarshaller#isXOPPackage()}, this annotation disables datatypes such as {@link java.awt.Image} or {@link Source} or <tt>byte[]</tt> that are bound to base64-encoded binary from being considered for


  45  * XOP encoding. If a JAXB property is annotated with this annotation or if
  46  * the JAXB property's base type is annotated with this annotation,
  47  * neither
  48  * {@link AttachmentMarshaller#addMtomAttachment(DataHandler, String, String)}
  49  * nor
  50  * {@link AttachmentMarshaller#addMtomAttachment(byte[], int, int, String, String, String)} is
  51  * ever called for the property. The binary data will always be inlined.
  52  *
  53  * @author Joseph Fialli
  54  * @since 1.6, JAXB 2.0
  55  */
  56 @Retention(RUNTIME)
  57 @Target({FIELD,METHOD,TYPE})
  58 public @interface XmlInlineBinaryData {
  59 }


  24  */
  25 
  26 package javax.xml.bind.annotation;
  27 
  28 import java.lang.annotation.Retention;
  29 import java.lang.annotation.Target;
  30 import static java.lang.annotation.RetentionPolicy.RUNTIME;
  31 import static java.lang.annotation.ElementType.FIELD;
  32 import static java.lang.annotation.ElementType.METHOD;
  33 import static java.lang.annotation.ElementType.TYPE;
  34 
  35 import javax.xml.transform.Source;
  36 import javax.xml.bind.attachment.AttachmentMarshaller;
  37 import javax.activation.DataHandler;
  38 
  39 /**
  40  * Disable consideration of XOP encoding for datatypes that are bound to
  41  * base64-encoded binary data in XML.
  42  *
  43  * <p>
  44  * When XOP encoding is enabled as described in {@link AttachmentMarshaller#isXOPPackage()},
  45  * this annotation disables datatypes such as {@link java.awt.Image} or {@link Source}
  46  * or {@code byte[]} that are bound to base64-encoded binary from being considered for
  47  * XOP encoding. If a JAXB property is annotated with this annotation or if
  48  * the JAXB property's base type is annotated with this annotation,
  49  * neither
  50  * {@link AttachmentMarshaller#addMtomAttachment(DataHandler, String, String)}
  51  * nor
  52  * {@link AttachmentMarshaller#addMtomAttachment(byte[], int, int, String, String, String)} is
  53  * ever called for the property. The binary data will always be inlined.
  54  *
  55  * @author Joseph Fialli
  56  * @since 1.6, JAXB 2.0
  57  */
  58 @Retention(RUNTIME)
  59 @Target({FIELD,METHOD,TYPE})
  60 public @interface XmlInlineBinaryData {
  61 }
< prev index next >