code: private static void checkHexDigit(int c) {
  		if (!Character.isDigit(c) && !(c >= 'a' && c <= 'f') && !(c >= 'A' && c <= 'F')) {
  			throw new IllegalStateException("Not a hexadecimal digit: " + c);
  		}
  	}
docs: Checks if the given character is a hexadecimal character
  @param c the character
  @throws IllegalStateException if the character is not hexadecimal