presto-orc/src/main/java/io/prestosql/orc/OrcOutputBuffer.java/OrcOutputBuffer/flushBufferToOutputStream
class OrcOutputBuffer:    private void flushBufferToOutputStream()
    {
        if (bufferPosition > 0) {
            writeChunkToOutputStream(buffer, 0, bufferPosition);
            bufferOffset += bufferPosition;
            bufferPosition = 0;
        }
    }