presto-orc/src/main/java/io/prestosql/orc/stream/ByteOutputStream.java/ByteOutputStream/getBufferedBytes
class ByteOutputStream:    @Override
    public long getBufferedBytes()
    {
        return buffer.estimateOutputDataSize() + size;
    }