presto-rcfile/src/main/java/io/prestosql/rcfile/BufferedOutputStreamSliceOutput.java/BufferedOutputStreamSliceOutput/ensureWritableBytes
class BufferedOutputStreamSliceOutput:    private void ensureWritableBytes(int minWritableBytes)
    {
        if (minWritableBytes > getFreeBufferLength()) {
            flushBufferToOutputStream();
        }
    }