List of utility methods to do Big Endian Convert
void | setBigIndianInBytesArray(byte[] toPutIn, int startidx, long theNumber, int len) put number in array (big endian way) for (int i = 0; i < len; i++) { long num = (theNumber >> (8 * (len - (i + 1)))) & 0xff; toPutIn[i + startidx] = (byte) num; |
void | setLittleIndianInBytesArray(byte[] toPutIn, int startidx, long theNumber, int len) put number in array (big endian way) for (int i = 0; i < len; i++) { toPutIn[i + startidx] = (byte) (theNumber % 256); theNumber /= 256; |