Getoctets byte unsigned

For the getoctets() function, I first split the string, convert them into int and then add them to the byte array. However, when I try to do it like this

bytearray[index]=(byte) integerform

I get a signed representation of the integers, how do I get an unsigned version?

You can use the magnifier in the top right to search for topics.

This is where you’re wrong: Yo do not get any “representation” of integers. You get 8 bits, how they are interpreted is up to the programmer.

1 Like