Class Utils


  • class Utils
    extends java.lang.Object
    Utility methods for this package.

    This class is immutable and thread-safe.

    Since:
    1.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int RADIX
      Radix used in encoding and decoding.
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static int digit16​(byte b)
      Returns the numeric value of the character b in radix 16.
      (package private) static char hexDigit​(int b)
      Returns the upper case hex digit of the lower 4 bits of the int.
      • Methods inherited from class java.lang.Object

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

      • RADIX

        private static final int RADIX
        Radix used in encoding and decoding.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Utils

        Utils()
    • Method Detail

      • digit16

        static int digit16​(byte b)
                    throws DecoderException
        Returns the numeric value of the character b in radix 16.
        Parameters:
        b - The byte to be converted.
        Returns:
        The numeric value represented by the character in radix 16.
        Throws:
        DecoderException - Thrown when the byte is not valid per Character.digit(char,int)
      • hexDigit

        static char hexDigit​(int b)
        Returns the upper case hex digit of the lower 4 bits of the int.
        Parameters:
        b - the input int
        Returns:
        the upper case hex digit of the lower 4 bits of the int.