‘liusuyi’
2023-12-04 6474b923d8f6d8ea5e5b63277f18335136c7e33c
src/main/java/com/ard/utils/other/ByteUtils.java
@@ -189,7 +189,12 @@
        // System.out.print("校验:"+DatatypeConverter.printHexBinary(bytes));//打印crc32的校验值
        return bytes;
    }
    /**
     * byte转二进制字符串
     */
    public static String byteToBitString(byte b) {
        return String.format("%8s", Integer.toBinaryString(b & 0xFF)).replace(' ', '0');
    }
    /**
     * 去除包头包尾
     * 刘苏义