presto-rcfile/src/main/java/io/prestosql/rcfile/BufferedOutputStreamSliceOutput.java/BufferedOutputStreamSliceOutput/writeBytes
class BufferedOutputStreamSliceOutput:    @Override
    public void writeBytes(InputStream in, int length)
            throws IOException
    {
        while (length > 0) {
            int batch = ensureBatchSize(length);
            slice.setBytes(bufferPosition, in, batch);
            bufferPosition += batch;
            length -= batch;
        }
    }