src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java
branchhttp-client-branch
changeset 56071 3353cb42b1b4
parent 56035 2f3f5da13c4c
equal deleted inserted replaced
56070:66a9c3185028 56071:3353cb42b1b4
   205         public void onNext(List<ByteBuffer> items) {
   205         public void onNext(List<ByteBuffer> items) {
   206             // incoming buffers are allocated by http client internally,
   206             // incoming buffers are allocated by http client internally,
   207             // and won't be used anywhere except this place.
   207             // and won't be used anywhere except this place.
   208             // So it's free simply to store them for further processing.
   208             // So it's free simply to store them for further processing.
   209             assert Utils.hasRemaining(items);
   209             assert Utils.hasRemaining(items);
   210             Utils.accumulateBuffers(received, items);
   210             received.addAll(items);
   211         }
   211         }
   212 
   212 
   213         @Override
   213         @Override
   214         public void onError(Throwable throwable) {
   214         public void onError(Throwable throwable) {
   215             received.clear();
   215             received.clear();