I'm reading in bytes to a byte array. The numbers are sent in the format <uint16>
, inclusive of the '<' and '>' symbols, transmitted in binary format 00111100 XXXXXXXX XXXXXXXX 00111110
where the 'X's make up the 16 bit unsigned int.
I want to remove the '<' and '>' characters, which are always the first and last bytes. This will allow me to convert the 16 bit unsigned int from binary to int.
What is the cleanest way of doing this?