0

I have parsed a txt file and as a result I have now a String str = "33 00 9D F2 C9 59 02 0A 00 00 CB 08 01 01 03 01 43 97 B1 02 9D F2 C9 59 1C 01 04 00 10 00 00 16 03 80 05 00 19 00 00 00 4D 00 06 00 45 00 5A A0 47 3E A7 04 D5 08 00 00 00"

now I do str.split(" ") which gives me a String[] containing each of those values from the string. How can I translate each of those 2 char strings to bytes without changing their values?

So basically how to do String[] = {"33", "00", "9D"....} -> byte[] = {33, 00, 9D}?

JensS
  • 1,151
  • 2
  • 13
  • 20
jarkow
  • 113
  • 11

0 Answers0