protected void flushBuffer() throws IOException {
        flushBuffer(buffer, 0, position);
        position = 0;
    }
Writes {@code buffer} by calling {@link #flushBuffer(byte[], int, int)} and
reset {@code position} to zero.

@throws IOException when failed to flush buffer
clickhouse-data/src/main/java/com/clickhouse/data/stream/AbstractByteArrayOutputStream.java