private void startSplit() throws IOException {
    currentDuration = 0;
    splitCount++;
    if (archiveName.getPath().endsWith(".gz")) {
      output = new GZIPOutputStream(new FileOutputStream(getOutputName()), BUFFER_SIZE);
    } else {
      output = new BufferedOutputStream(new FileOutputStream(getOutputName()), BUFFER_SIZE);
    }
    dataOut = new DataOutputStream(output);


    if (splitCount > 1) {
      dataOut.writeByte(HEADER_TOKEN);
      dataOut.writeByte(ARCHIVE_VERSION);
      dataOut.writeLong(startTimeStamp);
      dataOut.writeLong(systemId);
      dataOut.writeLong(systemStartTimeStamp);
      dataOut.writeInt(timeZoneOffset);
      dataOut.writeUTF(timeZoneName);
      dataOut.writeUTF(systemDirectory);
      dataOut.writeUTF(productVersion);
      dataOut.writeUTF(os);
      dataOut.writeUTF(machine);
    }

    for (int i = 0; i < globalTokenCount; i++) {
      dataOut.write(globalTokens[i]);
    }
    for (int i = 0; i < resourceInstanceTokens.length; i++) {
      if (resourceInstanceTokens[i] != null) {
        dataOut.write(resourceInstanceTokens[i]);
        byte[] instTypeCodes = resourceInstanceTypeCodes[i];
        long[] instBits = resourceInstanceBits[i];
        for (int j = 0; j < instBits.length; j++) {
          StatArchiveWriter.writeStatValue(instTypeCodes[j], instBits[j], dataOut);
        }
      }
    }
  }
Returns true if token read, false if eof.
geode-core/src/main/java/org/apache/geode/internal/statistics/ArchiveSplitter.java