Here you can find the source of ToHexNumber(int c)
private static int ToHexNumber(int c)
//package com.java2s; public class Main { private static int ToHexNumber(int c) { if (c >= 'A' && c <= 'Z') return 10 + c - 'A'; else if (c >= 'a' && c <= 'z') return 10 + c - 'a'; else if (c >= '0' && c <= '9') return c - '0'; return -1; }/*from w w w . j a v a 2 s .c o m*/ }