I have a byte array where the data in the array is actually short data. The bytes are ordered in little endian:
3, 1, -48, 0, -15, 0, 36, 1
Which when conver
With java.nio.ByteBuffer you may specify the endianness you want: order().
ByteBuffer have methods to extract data as byte, char, getShort(), getInt(), long, double...
Here's an example how to use it:
ByteBuffer bb = ByteBuffer.wrap(byteArray);
bb.order( ByteOrder.LITTLE_ENDIAN);
while( bb.hasRemaining()) {
short v = bb.getShort();
/* Do something with v... */
}