< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/attachment/AttachmentMarshaller.java

Print this page




 106      *
 107      * @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">XML-binary Optimized Packaging</a>
 108      * @see <a href="http://www.w3.org/TR/xml-media-types/">Describing Media Content of Binary Data in XML</a>
 109      */
 110     public abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName);
 111 
 112     /**
 113      * <p>Consider binary {@code data} for optimized binary storage as an attachment.
 114      *
 115      * <p>Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".
 116      *
 117      * <p>
 118      * The {@code elementNamespace} and {@code elementLocalName}
 119      * parameters provide the
 120      * context that contains the binary data. This information could
 121      * be used by the MIME-based package processor to determine if the
 122      * binary data should be inlined or optimized as an attachment.
 123      *
 124      * @param data
 125      *      represents the data to be attached. Must be non-null. The actual data region is
 126      *      specified by <tt>(data,offset,length)</tt> tuple.
 127      *
 128      * @param offset
 129      *       The offset within the array of the first byte to be read;
 130      *       must be non-negative and no larger than array.length
 131      *
 132      * @param length
 133      *       The number of bytes to be read from the given array;
 134      *       must be non-negative and no larger than array.length
 135      *
 136      * @param mimeType
 137      *      If the data has an associated MIME type known to JAXB, that is passed
 138      *      as this parameter. If none is known, "application/octet-stream".
 139      *      This parameter may never be null.
 140      *
 141      * @param elementNamespace
 142      *      the namespace URI of the element that encloses the base64Binary data.
 143      *      Can be empty but never null.
 144      *
 145      * @param elementLocalName
 146      *      The local name of the element. Always a non-null valid string.




 106      *
 107      * @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">XML-binary Optimized Packaging</a>
 108      * @see <a href="http://www.w3.org/TR/xml-media-types/">Describing Media Content of Binary Data in XML</a>
 109      */
 110     public abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName);
 111 
 112     /**
 113      * <p>Consider binary {@code data} for optimized binary storage as an attachment.
 114      *
 115      * <p>Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".
 116      *
 117      * <p>
 118      * The {@code elementNamespace} and {@code elementLocalName}
 119      * parameters provide the
 120      * context that contains the binary data. This information could
 121      * be used by the MIME-based package processor to determine if the
 122      * binary data should be inlined or optimized as an attachment.
 123      *
 124      * @param data
 125      *      represents the data to be attached. Must be non-null. The actual data region is
 126      *      specified by {@code (data,offset,length)} tuple.
 127      *
 128      * @param offset
 129      *       The offset within the array of the first byte to be read;
 130      *       must be non-negative and no larger than array.length
 131      *
 132      * @param length
 133      *       The number of bytes to be read from the given array;
 134      *       must be non-negative and no larger than array.length
 135      *
 136      * @param mimeType
 137      *      If the data has an associated MIME type known to JAXB, that is passed
 138      *      as this parameter. If none is known, "application/octet-stream".
 139      *      This parameter may never be null.
 140      *
 141      * @param elementNamespace
 142      *      the namespace URI of the element that encloses the base64Binary data.
 143      *      Can be empty but never null.
 144      *
 145      * @param elementLocalName
 146      *      The local name of the element. Always a non-null valid string.


< prev index next >