public String toString() {
    StringBuilder sb = new StringBuilder();
    try {
      sb.append("FileCopyGetChunkResponse[")
          .append("PartitionId=").append(partitionId.getId())
          .append(", FileName=").append(fileName)
          .append(", SizeInBytes=").append(chunkStream.available())
          .append(", isLastChunk=").append(isLastChunk)
          .append("]");
    } catch (IOException e) {
      logger.info("Error while reading chunkStream", e);
      throw new RuntimeException(e);
    }
    return sb.toString();
  }
Write the response to the buffer.
ambry-protocol/src/main/java/com/github/ambry/protocol/FileCopyGetChunkResponse.java