Here you can find the source of fromHexChars(char[] chars, int i)
public static int fromHexChars(char[] chars, int i)
//package com.java2s; //The contents of this file are subject to the "Simplified BSD License" (the "License"); public class Main { public static int fromHexChars(char[] chars, int i) { int n1 = chars[i] >= 'A' ? (10 + (chars[i] - 'A')) : (chars[i] - '0'); i++;/*w w w . j av a2 s . c om*/ int n2 = chars[i] >= 'A' ? (10 + (chars[i] - 'A')) : (chars[i] - '0'); byte b = (byte) ((n1 << 4) | n2); return b & 0xFF; } }