private void makeRoom(int n) {
      if (idx + n > readBytes.length) {
        byte[] tmp = new byte[readBytes.length + n + 1024];
        System.arraycopy(readBytes, 0, tmp, 0, readBytes.length);
        readBytes = tmp;
      }
    }
Writes all the bytes, read or skipped, since the last reset to the specified output stream.
Does a mark and reset after the write.
geode-core/src/main/java/org/apache/geode/internal/statistics/ArchiveSplitter.java