@Deprecated
    public ClickHouseOutputStream transferBytes(ByteBuffer buffer, int length) throws IOException {
        if (buffer == null || length < 0) {
            throw new IllegalArgumentException("Non-null ByteBuffer and positive length are required");
        }

        byte[] bytes;
        if (buffer.hasArray()) {
            bytes = buffer.array();
        } else {
            bytes = new byte[length];
            buffer.get(bytes);
        }
        return transferBytes(bytes, 0, length);
    }
Transfer bytes into output stream without creating a copy.

@param buffer non-null byte buffer
@param length bytes to write
@return current output stream
@throws IOException when failed to write value into output stream, not able
                    to sent all bytes, or operate on a closed stream
@deprecated will be dropped in 0.5, please use
            {@link #writeBuffer(ClickHouseByteBuffer)} instead
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseOutputStream.java