Here you can find the source of fromHexNibble(char n)
private static byte fromHexNibble(char n)
//package com.java2s; //License from project: GNU General Public License public class Main { /**// w w w . java2s .c om * Convert a hexadecimal digit to a byte. */ private static byte fromHexNibble(char n) { if (n <= '9') return (byte) (n - '0'); if (n <= 'G') return (byte) (n - ('A' - 10)); return (byte) (n - ('a' - 10)); } }