public static String toStringBinary(final byte[] b, int off, int len) {
        StringBuilder result = new StringBuilder();
        String first = new String(b, off, len, StandardCharsets.ISO_8859_1);
        for (int i = 0; i < first.length(); ++i) {
            int ch = first.charAt(i) & 0xFF;
            if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')
                    || " `~!@#$%^&*()-_=+[]{}\\|;:'\",.<>/?".indexOf(ch) >= 0) {
                result.append(first.charAt(i));
            } else {
                result.append(String.format("\\x%02X", ch));
            }
        }
        return result.toString();
    }
Lexicographically compare two arrays.

@param buffer1 left operand
@param buffer2 right operand
@param offset1 Where to start comparing in the left buffer
@param offset2 Where to start comparing in the right buffer
@param length1 How much to compare from the left buffer
@param length2 How much to compare from the right buffer
@return 0 if equal, < 0 if left is less than right, etc.
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/utils/Bytes.java