Here you can find the source of fromHexShort(char a)
private static int fromHexShort(char a)
//package com.java2s; //License from project: Open Source License public class Main { private static int fromHexShort(char a) { if (a >= '0' && a <= '9') { return a - '0'; }/* www.j ava2s . c o m*/ if (a >= 'a' && a <= 'f') { return 10 + (a - 'a'); } throw new RuntimeException(); } }