@Override
    public ClickHouseOutputStream writeCustom(ClickHouseDataUpdater writer) throws IOException {
        ensureOpen();

        int written = 0;
        while ((written = writer.update(buffer, position, buffer.length)) < 0) {
            flushBuffer();
        }
        position += written;
        return this;
    }
Writes the given byte array without using {@code buffer} and
{@code position}.

@param bytes  non-null byte array to write
@param offset offset
@param length length in byte
@throws IOException when failed to write data
clickhouse-data/src/main/java/com/clickhouse/data/stream/AbstractByteArrayOutputStream.java