Package picard.util

Class UnsignedTypeUtil


  • public class UnsignedTypeUtil
    extends Object
    A utility class for dealing with unsigned types. This class is primarily used for promoting a value in an unsigned type to the same value in the net larger type of the same form (e.g. Integer to Long)
    • Constructor Detail

      • UnsignedTypeUtil

        public UnsignedTypeUtil()
    • Method Detail

      • uByteToInt

        public static int uByteToInt​(byte unsignedByte)
        Convert an unsigned byte to a signed int
      • uByteToShort

        public static int uByteToShort​(byte unsignedByte)
        Convert an unsigned byte to a signed short
      • uShortToInt

        public static int uShortToInt​(short unsignedShort)
        Convert an unsigned short to an Int
      • uIntToLong

        public static long uIntToLong​(int unsignedInt)
        Convert an unsigned int to a long
      • uIntToFloat

        public static float uIntToFloat​(int unsignedInt)