presto-orc/src/main/java/io/prestosql/orc/stream/OrcInputStream.java/OrcInputStream/readFully
class OrcInputStream:    public void readFully(byte[] buffer, int offset, int length)
            throws IOException
    {
        while (offset < length) {
            int result = read(buffer, offset, length - offset);
            if (result < 0) {
                throw new OrcCorruptionException(chunkLoader.getOrcDataSourceId(), "Unexpected end of stream");
            }
            offset += result;
        }
    }