@Override
  public Future<Long> readInto(AsyncWritableChannel asyncWritableChannel, Callback<Long> callback) {
    if (readIntoInvoked.compareAndSet(false, true)) {
      writeChannel = asyncWritableChannel;
      readIntoCallback = callback;
      writeToChannel();
    } else {
      throw new IllegalStateException("ReadInto should not be called more than once");
    }
    return futureResult;
  }
Create an instance of PerfRSC.
@param bytes the bytes that form a chunk that will be repeatedly returned until {@code streamSize} is reached.
@param streamSize the desired total size of the stream.
ambry-tools/src/main/java/com/github/ambry/tools/perf/rest/PerfRSC.java