liurunyu
2024-11-08 04779efe2410fb0df1ff983b26384d56471b85cf
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtilUnsigned.java
@@ -438,15 +438,18 @@
         return true;
      }
   }
   public static void main(String[] args) throws Exception{
      byte[] bs = new byte[]{(byte)0x38,(byte)0x1d,(byte)0x00,(byte)0x00,(byte)0x00} ;
      Long lg1 = ByteUtilUnsigned.bytes2Long_LE(bs, 0, 4) ;
      Long lg2 = ByteUtilUnsigned.bytes2Long_BE(bs, 0, 4) ;
      System.out.println(lg1);
      System.out.println(lg2);
   }
//   public static void main(String[] args) throws Exception{
//      byte[] bs = new byte[]{(byte)0x38,(byte)0x1d,(byte)0x00,(byte)0x00,(byte)0x00} ;
//      Long lg1 = ByteUtilUnsigned.bytes2Long_LE(bs, 0, 4) ;
//      Long lg2 = ByteUtilUnsigned.bytes2Long_BE(bs, 0, 4) ;
//      System.out.println(lg1);
//      System.out.println(lg2);
//   }
   public static void main(String[] args) throws Exception{
      byte[] bs = new byte[]{0x02, 0x0C} ;
      int s = ByteUtilUnsigned.bytes2Short_BE(bs, 0) ;
      System.out.println(s);
////      int d = 123456;
////      byte[] bs = new byte[4] ;
////      int2Bytes_BE(bs, d, 0) ;
@@ -467,5 +470,5 @@
//      System.out.println(s);
//
//
//   }
   }
}