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