String s = "f334223a29f";
int len = (int)Math.ceil(s.length()/2.0);
byte[] bs = new byte[len];
for(int index =0;
index < len;
index++){
int endIndex = ((index*2+2)>s.length())?s.length():index*2+2;
bs[index] = (byte)Integer.parseInt(s.substring(index*2,endIndex),16);
for(int i = 0;
i< bs.length;
i++)
System.out.println(""+bs);
output:
-13,52,34,58,41,15
satisfy your requirement?