class Hex {

	public static byte[] fromHexString (String s) {
	   int n = s.length()/2;
	   byte[] tbr = new byte[n];
	   int strIndex = 0;
	   String char2;
	   for (int i=0;i<n;i++) {
	      char2 = s.substring(strIndex, strIndex+2);
	      tbr[i] = (byte) fromString(char2);
	      strIndex+=2;
	   }
	   return tbr;
	}

}