protected int hexDigitDecode(char hexDigit)
{
if (hexDigit >= '0' && hexDigit <= '9') return hexDigit - '0';
if (hexDigit >= 'a' && hexDigit <= 'f') return hexDigit - 'a' + 10;
if (hexDigit >= 'A' && hexDigit <= 'F') return hexDigit - 'A' + 10;
return 0;
}