Here you can find the source of fromHex(String hex)
static public byte[] fromHex(String hex)
//package com.java2s; //License from project: Apache License import javax.xml.bind.DatatypeConverter; public class Main { static public byte[] fromHex(String hex) { return DatatypeConverter.parseHexBinary(hex); }//w w w . ja va 2 s .c o m }