I need to convert 2 bytes (2\'s complement) into an int in Java code. how do I do it?
toInt(byte hb, byte lb) { }
For those of you who are looking for the Little Endian value:
int num = ByteBuffer.wrap(b, 0, 2).order(LITTLE_ENDIAN).char.toInt()