zhangchao
2024-09-01 d4884acd58bf73c2cb39c0d009f5f2eb461e22d1
src/main/java/com/zy/common/utils/Struct.java
@@ -370,6 +370,8 @@
      instance.unusedBytes = unusedBytes;
      return (T) instance;
   }
   // 字节数组 ===>> 转为十六进制字符串
   public static String toHex(byte[] bytes) {
        StringBuilder buf = new StringBuilder(bytes.length * 2);
        for(byte b : bytes) { // 使用String的format方法进行转换
@@ -444,7 +446,6 @@
      }
      return bbt;
   }
    
    public static class TestMessage {
      public @size(1) byte begin = 0x7e;//起始符