--- old/src/java.xml.bind/share/classes/javax/xml/bind/attachment/AttachmentMarshaller.java 2015-04-21 17:20:13.208098478 +0400 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/attachment/AttachmentMarshaller.java 2015-04-21 17:20:13.120098478 +0400 @@ -29,22 +29,22 @@ import javax.xml.bind.Marshaller; /** - *

Enable JAXB marshalling to optimize storage of binary data.

+ *

Enable JAXB marshalling to optimize storage of binary data. * *

This API enables an efficient cooperative creation of optimized * binary data formats between a JAXB marshalling process and a MIME-based package * processor. A JAXB implementation marshals the root body of a MIME-based package, * delegating the creation of referenceable MIME parts to - * the MIME-based package processor that implements this abstraction.

+ * the MIME-based package processor that implements this abstraction. * *

XOP processing is enabled when {@link #isXOPPackage()} is true. * See {@link #addMtomAttachment(DataHandler, String, String)} for details. - *

+ * * *

WS-I Attachment Profile 1.0 is supported by * {@link #addSwaRefAttachment(DataHandler)} being called by the * marshaller for each JAXB property related to - * {http://ws-i.org/profiles/basic/1.1/xsd}swaRef.

+ * {http://ws-i.org/profiles/basic/1.1/xsd}swaRef. * * * @author Marc Hadley @@ -60,33 +60,33 @@ public abstract class AttachmentMarshaller { /** - *

Consider MIME content data for optimized binary storage as an attachment. + *

Consider MIME content {@code data} for optimized binary storage as an attachment. * *

* This method is called by JAXB marshal process when {@link #isXOPPackage()} is - * true, for each element whose datatype is "base64Binary", as described in + * {@code true}, for each element whose datatype is "base64Binary", as described in * Step 3 in * Creating XOP Packages. * *

- * The method implementor determines whether data shall be attached separately + * The method implementor determines whether {@code data} shall be attached separately * or inlined as base64Binary data. If the implementation chooses to optimize the storage - * of the binary data as a MIME part, it is responsible for attaching data to the + * of the binary data as a MIME part, it is responsible for attaching {@code data} to the * MIME-based package, and then assigning an unique content-id, cid, that identifies * the MIME part within the MIME message. This method returns the cid, * which enables the JAXB marshaller to marshal a XOP element that refers to that cid in place * of marshalling the binary data. When the method returns null, the JAXB marshaller - * inlines data as base64binary data. + * inlines {@code data} as base64binary data. * *

* The caller of this method is required to meet the following constraint. - * If the element infoset item containing data has the attribute - * xmime:contentType or if the JAXB property/field representing - * datais annotated with a known MIME type, - * data.getContentType() should be set to that MIME type. + * If the element infoset item containing {@code data} has the attribute + * {@code xmime:contentType} or if the JAXB property/field representing + * {@code data} is annotated with a known MIME type, + * {@code data.getContentType()} should be set to that MIME type. * *

- * The elementNamespace and elementLocalName + * The {@code elementNamespace} and {@code elementLocalName} * parameters provide the * context that contains the binary data. This information could * be used by the MIME-based package processor to determine if the @@ -101,7 +101,7 @@ * The local name of the element. Always a non-null valid string. * * @return - * a valid content-id URI (see RFC 2387) that identifies the attachment containing data. + * a valid content-id URI (see RFC 2387) that identifies the attachment containing {@code data}. * Otherwise, null if the attachment was not added and should instead be inlined in the message. * * @see XML-binary Optimized Packaging @@ -110,12 +110,12 @@ public abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName); /** - *

Consider binary data for optimized binary storage as an attachment. + *

Consider binary {@code data} for optimized binary storage as an attachment. * - *

Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".

+ *

Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream". * *

- * The elementNamespace and elementLocalName + * The {@code elementNamespace} and {@code elementLocalName} * parameters provide the * context that contains the binary data. This information could * be used by the MIME-based package processor to determine if the @@ -146,21 +146,21 @@ * The local name of the element. Always a non-null valid string. * * @return content-id URI, cid, to the attachment containing - * data or null if data should be inlined. + * {@code data} or null if data should be inlined. * * @see #addMtomAttachment(DataHandler, String, String) */ public abstract String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName); /** - *

Read-only property that returns true if JAXB marshaller should enable XOP creation.

+ *

Read-only property that returns true if JAXB marshaller should enable XOP creation. * *

This value must not change during the marshalling process. When this - * value is true, the addMtomAttachment(...) method + * value is true, the {@code addMtomAttachment(...)} method * is invoked when the appropriate binary datatypes are encountered by - * the marshal process.

+ * the marshal process. * - *

Marshaller.marshal() must throw IllegalStateException if this value is true + *

Marshaller.marshal() must throw IllegalStateException if this value is {@code true} * and the XML content to be marshalled violates Step 1 in * Creating XOP Pacakges * http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages. @@ -168,18 +168,18 @@ * [namespace name] of "http://www.w3.org/2004/08/xop/include" and a [local name] of Include" * *

When this method returns true and during the marshal process - * at least one call to addMtomAttachment(...) returns + * at least one call to {@code addMtomAttachment(...)} returns * a content-id, the MIME-based package processor must label the * root part with the application/xop+xml media type as described in * Step 5 of - * Creating XOP Pacakges.

+ * Creating XOP Pacakges. * * @return true when MIME context is a XOP Package. */ public boolean isXOPPackage() { return false; } /** - *

Add MIME data as an attachment and return attachment's content-id, cid.

+ *

Add MIME {@code data} as an attachment and return attachment's content-id, cid. * *

* This method is called by JAXB marshal process for each element/attribute typed as @@ -188,7 +188,7 @@ * MIME attachment, and generating a content-id, cid, that uniquely identifies the attachment * within the MIME-based package. * - *

Caller inserts the returned content-id, cid, into the XML content being marshalled.

+ *

Caller inserts the returned content-id, cid, into the XML content being marshalled. * * @param data * represents the data to be attached. Must be non-null.