I have a function that takes a string of "hex" values as an argument (e.g., "0x05","0x21","0xF2"), and converts them to actual bytes to manipulate them.
byte[] data = new byte[255];
String[] s = args[0].split(",");
for (int i = 0; i < s.length; i++) {
data[i] = Byte.decode(s);
}This works great up to hex value 0x7F (integer value 127), however bombs on larger values, I believe because Bytes are signed(?) in Java.
There must be a workaround--any suggestions?