@Override
  public Future<Long> readInto(AsyncWritableChannel asyncWritableChannel, Callback<Long> callback) {
    if (callbackWrapper != null) {
      throw new IllegalStateException("ReadableStreamChannel cannot be read more than once");
    } else if (!readyForRead) {
      throw new IllegalStateException("The channel cannot be read yet");
    }
    callbackWrapper = new ReadIntoCallbackWrapper(callback);
    if (!isOpen()) {
      nettyMetrics.multipartRequestAlreadyClosedError.inc();
      callbackWrapper.invokeCallback(new ClosedChannelException());
    }
    HttpContent content = requestContents.poll();
    while (content != null) {
      try {
        writeContent(asyncWritableChannel, callbackWrapper, content);
      } finally {
        ReferenceCountUtil.release(content);
      }
      content = requestContents.poll();
    }
    return callbackWrapper.futureResult;
  }
{@inheritDoc}
@param asyncWritableChannel the {@link AsyncWritableChannel} to read the data into.
@param callback the {@link Callback} that will be invoked either when all the data in the channel has been emptied
                into the {@code asyncWritableChannel} or if there is an exception in doing so. This can be null.
@return the {@link Future} that will eventually contain the result of the operation.
@throws IllegalStateException if an attempt is made to read the channel before calling {@link #prepare()} or if
                               this function is called more than once.
ambry-rest/src/main/java/com/github/ambry/rest/NettyMultipartRequest.java