public void disallowExpansion() {
    disallowExpansion = true;
  }
If this BufferDataOutputStream detects that it needs to
grow then it will throw an IllegalStateException.
geode-serialization/src/main/java/org/apache/geode/internal/serialization/BufferDataOutputStream.java