Class JavaUnsignedUtil


  • class JavaUnsignedUtil
    extends java.lang.Object
    Helper class to deal with unsigned primitives in java
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int asU16​(short number)  
      static int asU8​(byte number)  
      static int compareAsUnsigned​(int left, int right)  
      static short toU16​(int number)  
      static byte toU8​(int number)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaUnsignedUtil

        JavaUnsignedUtil()
    • Method Detail

      • asU16

        public static int asU16​(short number)
      • asU8

        public static int asU8​(byte number)
      • toU8

        public static byte toU8​(int number)
      • toU16

        public static short toU16​(int number)
      • compareAsUnsigned

        public static int compareAsUnsigned​(int left,
                                            int right)