Android Utililty Methods Byte Array to Little Endian Convert

List of utility methods to do Byte Array to Little Endian Convert

Description

The list of methods to do Byte Array to Little Endian Convert are organized into topic(s).

Method

intgetByteLittleEndian_unit16(byte[] theBytes, int idx)
pull out unsigned 16 bits integer out of the array.
int sum = 0;
for (int i = 0; i < 2; i++) {
    sum = (sum << 8) + (0xff & theBytes[i + idx]);
return flip16(sum);
intgetWord(byte[] buffer, int pos)
Convert byte to 16 bit integer.
int first = getUnsignedSafe(buffer, pos);
int second = getUnsignedSafe(buffer, pos + 1);
int res = second + ((first << 8) & 0x0000FF00);
return res;