http-client-branch: move immutable flow to an impl note http-client-branch
authorchegar
Fri, 01 Jun 2018 18:10:56 +0100
branchhttp-client-branch
changeset 56654 b72e5af6fb6b
parent 56653 e9009db09cff
child 56665 67fb9313d860
http-client-branch: move immutable flow to an impl note
src/java.net.http/share/classes/java/net/http/HttpResponse.java
--- a/src/java.net.http/share/classes/java/net/http/HttpResponse.java	Fri Jun 01 17:15:58 2018 +0100
+++ b/src/java.net.http/share/classes/java/net/http/HttpResponse.java	Fri Jun 01 18:10:56 2018 +0100
@@ -831,12 +831,12 @@
      *
      * <p> The object acts as a {@link Flow.Subscriber}&lt;{@link List}&lt;{@link
      * ByteBuffer}&gt;&gt; to the HTTP client implementation, which publishes
-     * unmodifiable lists of read-only ByteBuffers containing the response body.
-     * The Flow of data, as well as the order of ByteBuffers in the Flow lists,
-     * is a strictly ordered representation of the response body. Both the Lists
-     * and the ByteBuffers, once passed to the subscriber, are no longer used by
-     * the HTTP client. The subscriber converts the incoming buffers of data to
-     * some higher-level Java type {@code T}.
+     * lists of ByteBuffers containing the response body. The Flow of data, as
+     * well as the order of ByteBuffers in the Flow lists, is a strictly ordered
+     * representation of the response body. Both the Lists and the ByteBuffers,
+     * once passed to the subscriber, are no longer used by the HTTP Client. The
+     * subscriber converts the incoming buffers of data to some higher-level
+     * Java type {@code T}.
      *
      * <p> The {@link #getBody()} method returns a
      * {@link CompletionStage}&lt;{@code T}&gt; that provides the response body
@@ -859,6 +859,9 @@
      * may cause the underlying HTTP connection to be closed and prevent it
      * from being reused for subsequent operations.
      *
+     * @implNote The flow of data containing the response body is immutable.
+     * Specifically, it is a flow of unmodifiable lists of read-only ByteBuffers.
+     *
      * @param <T> the response body type
      * @see BodySubscribers
      * @since 11