private void flushMainBuffer() throws IOException {
        raFile.write(ByteBuffer.wrap(mainBuffer.getRawBuffer(), 0, mainBuffer.size()));
        mainBuffer.reset();
    }
Write the buffer to the file and reset it.
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/BlockGZIPOutputFile.java