protected static int toDigit ( final char ch , final int index ) throws HexDecodeException { final int digit = Character . digit ( ch , 16 ) ; if ( digit == - 1 ) { throw new HexDecodeException ( "Illegal hexadecimal character " + ch + " at index " + index ) ; } return digit ; }
Converts a hexadecimal character to an integer .