Here you can find the source of charToByte(char c)
private static byte charToByte(char c)
//package com.java2s; public class Main { private static byte charToByte(char c) { return (byte) "0123456789ABCDEF".indexOf(c); }//from ww w . j a va2s.c om }