public ByteBuffer getDuplicateBuffer() {
    return buffer.duplicate();
  }
Gets a duplicate of the current content buffer.
geode-core/src/main/java/org/apache/geode/internal/ByteBufferOutputStream.java