public boolean match(byte[] bytes) {
        boolean matched = false;
        int len = bytes == null ? 0 : bytes.length;
        if (len == this.length) {
            matched = true;
            for (int i = 0; i < len; i++) {
                if (bytes[i] != array[position + i]) {
                    matched = false;
                    break;
                }
            }
        }
        return matched;
    }
Checks if the byte buffer is same as the given byte array.

@param bytes bytes to check
@return true if the byte buffer is same as the given byte array; false
        otherwise
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseByteBuffer.java