--- old/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java 2015-07-08 13:25:04.000000000 +0200 +++ new/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java 2015-07-08 13:25:04.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,15 +50,15 @@ * This header identifies the type of data in the content of an * {@code AttachmentPart} object and MUST conform to [RFC2045]. * The following is an example of a Content-Type header: - *
+ * {@code * Content-Type: application/xml - *+ * } * The following line of code, in which {@code ap} is an * {@code AttachmentPart} object, sets the header shown in * the previous example. - *
+ * {@code * ap.setMimeHeader("Content-Type", "application/xml"); - *+ * } * * *
@@ -79,23 +79,23 @@ * sets the {@code AttachmentPart} object with some content and * header information, and adds the {@code AttachmentPart} object to * the {@code SOAPMessage} object. - *
+ * {@code * AttachmentPart ap1 = m.createAttachmentPart(); * ap1.setContent(contentString1, "text/plain"); * m.addAttachmentPart(ap1); - *+ * } * * *
* The following code fragment creates and adds a second * {@code AttachmentPart} instance to the same message. {@code jpegData} * is a binary byte buffer representing the jpeg file. - *
+ * {@code * AttachmentPart ap2 = m.createAttachmentPart(); * byte[] jpegData = ...; * ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg"); * m.addAttachmentPart(ap2); - *+ * } *
* The {@code getContent} method retrieves the contents and header from * an {@code AttachmentPart} object. Depending on the @@ -103,16 +103,16 @@ * {@code Object} can either be a typed Java object corresponding * to the MIME type or an {@code InputStream} object that contains the * content as bytes. - *
+ * {@code * String content1 = ap1.getContent(); * java.io.InputStream content2 = ap2.getContent(); - *+ * } * * The method {@code clearContent} removes all the content from an * {@code AttachmentPart} object but does not affect its header information. - *
+ * {@code * ap1.clearContent(); - *+ * } * * @since 1.6 */