presto-orc/src/main/java/io/prestosql/orc/OrcOutputBuffer.java/OrcOutputBuffer/size
class OrcOutputBuffer:    @Override
    public int size()
    {
        return toIntExact(bufferOffset + bufferPosition);
    }