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 w ww . j a v a 2 s .c o m }