--- old/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java 2017-02-14 14:25:19.516062723 +0300 +++ new/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java 2017-02-14 14:25:19.420062110 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -48,13 +48,12 @@ * until the blank line that indicates end of header. The input stream * is positioned at the start of the body. The lines are stored * within the object and can be extracted as either Strings or - * {@link Header} objects.
- *
+ * {@link Header} objects. + ** This class is mostly intended for service providers. MimeMessage - * and MimeBody use this class for holding their headers.
- *
- *- *
+ * and MimeBody use this class for holding their headers. + ** RFC822 and MIME header fields must contain only * US-ASCII characters. If a header contains non US-ASCII characters, * it must be encoded as per the rules in RFC 2047. The MimeUtility @@ -65,7 +64,7 @@ * header fields must be folded (wrapped) before being sent if they * exceed the line length limitation for the transport (1000 bytes for * SMTP). Received headers may have been folded. The application is - * responsible for folding and unfolding headers as appropriate.
+ * responsible for folding and unfolding headers as appropriate. * * @author John Mani * @author Bill Shannon @@ -90,12 +89,13 @@ * Read and parse the given RFC822 message stream till the * blank line separating the header from the body. The input * stream is left positioned at the start of the body. The - * header lines are stored internally.
- *
+ * header lines are stored internally. + ** For efficiency, wrap a BufferedInputStream around the actual * input stream and pass it as the parameter. * * @param is RFC822 input stream + * @exception MessagingException in case of error */ public InternetHeaders(InputStream is) throws MessagingException { load(is); @@ -104,13 +104,14 @@ /** * Read and parse the given RFC822 message stream till the * blank line separating the header from the body. Store the - * header lines inside this InternetHeaders object.
- *
+ * header lines inside this InternetHeaders object. + ** Note that the header lines are added into this InternetHeaders * object, so any existing headers in this object will not be * affected. * * @param is RFC822 input stream + * @exception MessagingException in case of error */ public void load(InputStream is) throws MessagingException { // Read header lines until a blank line. It is valid @@ -208,9 +209,9 @@ /** * Change the first header line that matches name * to have value, adding a new header if no existing header - * matches. Remove all matching headers but the first.
- *
- * Note that RFC822 headers can only contain US-ASCII characters + * matches. Remove all matching headers but the first. + *+ * Note that RFC822 headers can only contain US-ASCII characters. * * @param name header name * @param value header value @@ -242,8 +243,7 @@ } /** - * Add a header with the specified name and value to the header list.
- *
+ * Add a header with the specified name and value to the header list. * Note that RFC822 headers can only contain US-ASCII characters. * * @param name header name @@ -285,15 +285,15 @@ * * @return Header objects */ - public List extends Header> getAllHeaders() { + public FinalArrayList- *
+ * add it to the last header line in the list. + *
* Note that RFC822 headers can only contain US-ASCII characters
*
* @param line raw RFC822 header line
@@ -316,15 +316,19 @@
/**
* Return all the header lines as a collection
+ *
+ * @return list of header lines.
*/
public List