public void reset() {
    size = 0;
    if (chunks != null) {
      chunks.clear();
      chunks = null;
    }
    buffer.clear();
    writeMode = true;
    ignoreWrites = false;
    disallowExpansion = false;
    expansionException = null;
  }
Prepare the contents for sending again
geode-serialization/src/main/java/org/apache/geode/internal/serialization/BufferDataOutputStream.java