@Override
    public int read() throws IOException {
        ensureOpen();

        return buffer == ClickHouseByteBuffer.EMPTY_BUFFER ? -1 : 0xFF & buffer.get();
    }
Update inner buffer as needed.

@return remaining bytes in buffer
@throws IOException when failed to update buffer
clickhouse-data/src/main/java/com/clickhouse/data/stream/AbstractByteBufferInputStream.java