private void basicSendTo(ByteBufferWriter out, ByteBuffer bb) {
    int bytesToWrite = bb.remaining();
    if (bytesToWrite > 0) {
      out.write(bb.duplicate());
      size -= bytesToWrite;
    }
  }
Write the contents of this stream to the specified stream.
geode-core/src/main/java/org/apache/geode/internal/HeapDataOutputStream.java