Logo Search packages:      
Sourcecode: jaminid version File versions  Download package

static int com::prolixtech::jaminid::Request::hex2int ( char  a  )  [inline, static, private]

convenience function for converting hex to int

Parameters:
a the character to convert
Returns:
the converted character

Definition at line 361 of file Request.java.

                                       {

        if (Character.isDigit(a)) {
            return Integer.parseInt(String.valueOf(a));
        }
        a = Character.toUpperCase(a);
        if (a >= 'A' && a <= 'F') {
            return a - 'A' + 10;
        }

        throw new IllegalArgumentException("Invalid Hex");
    }


Generated by  Doxygen 1.6.0   Back to index