Here you can find the source of convertHex(char c)
private static int convertHex(char c)
//package com.java2s; public class Main { private static int convertHex(char c) { if ('0' <= c && c <= '9') { return c - '0'; }/* w w w . ja v a 2 s . c o m*/ if ('a' <= c && c <= 'f') { return c - 'a' + 10; } return c - 'A' + 10; } }