private static int charToNibble(char c){
  if (c > 'f') {
    throw new IllegalArgumentException("Invalid hex character: " + c);
  }
  int nibble=hexCodes[c];
  if (nibble < 0) {
    throw new IllegalArgumentException("Invalid hex character: " + c);
  }
  return nibble;
}

private static int charToNibble ( char c ) { if ( c > 'f' ) { throw new IllegalArgumentException ( "Invalid hex character: " + c ) ; } int nibble = hexCodes [ c ] ; if ( nibble < 0 ) { throw new IllegalArgumentException ( "Invalid hex character: " + c ) ; } return nibble ; }
convert a single hex character to its corresponding hex value using pre - calculated translation table .
