Here you can find the source of fromHexString(String value)
public static byte[] fromHexString(String value)
//package com.java2s; //License from project: LGPL public class Main { public static byte[] fromHexString(String value) { byte[] rs = new byte[value.length() / 2]; for (int i = 0; i < value.length(); i += 2) { String b = value.substring(i, i + 2); rs[i / 2] = Integer.valueOf(b, 16).byteValue(); }//from ww w .j a v a 2 s. co m return rs; } }