protected static int toDigit(char ch,int index) throws DecoderException {
  int digit=Character.digit(ch,16);
  if (digit == -1) {
    throw new DecoderException("Illegal hexadecimal charcter " + ch + " at index "+ index);
  }
  return digit;
}

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