static public int hexCharToIntValue(char c) {
        if (c == '0') {
            return 0;
        } else if (c == '1') {
            return 1;
        } else if (c == '2') {
            return 2;
        } else if (c == '3') {
            return 3;
        } else if (c == '4') {
            return 4;
        } else if (c == '5') {
            return 5;
        } else if (c == '6') {
            return 6;
        } else if (c == '7') {
            return 7;
        } else if (c == '8') {
            return 8;
        } else if (c == '9') {
            return 9;
        } else if (c == 'A' || c == 'a') {
            return 10;
        } else if (c == 'B' || c == 'b') {
            return 11;
        } else if (c == 'C' || c == 'c') {
            return 12;
        } else if (c == 'D' || c == 'd') {
            return 13;
        } else if (c == 'E' || c == 'e') {
            return 14;
        } else if (c == 'F' || c == 'f') {
            return 15;
        } else {
            throw new IllegalArgumentException("The character [" + c + "] does not represent a valid hex digit");
        }
    }
static public int hexCharToIntValue ( char c ) { if ( c == '0' ) { return 0 ; } else if ( c == '1' ) { return 1 ; } else if ( c == '2' ) { return 2 ; } else if ( c == '3' ) { return 3 ; } else if ( c == '4' ) { return 4 ; } else if ( c == '5' ) { return 5 ; } else if ( c == '6' ) { return 6 ; } else if ( c == '7' ) { return 7 ; } else if ( c == '8' ) { return 8 ; } else if ( c == '9' ) { return 9 ; } else if ( c == 'A' || c == 'a' ) { return 10 ; } else if ( c == 'B' || c == 'b' ) { return 11 ; } else if ( c == 'C' || c == 'c' ) { return 12 ; } else if ( c == 'D' || c == 'd' ) { return 13 ; } else if ( c == 'E' || c == 'e' ) { return 14 ; } else if ( c == 'F' || c == 'f' ) { return 15 ; } else { throw new IllegalArgumentException ( "The character [" + c + "] does not represent a valid hex digit" ) ; } }
Converts a hexidecimal character such as '0' or 'A' or 'a' to its integer
value such as 0 or 10.  Used to decode hexidecimal Strings to integer values.
@param c The hexidecimal character
@return The integer value the character represents
@throws IllegalArgumentException Thrown if a character that does not
represent a hexidecimal character is used.