List of utility methods to do Byte Array to Int
int | byteToInt2(byte[] b) byte To Int int iOutcome = 0; byte bLoop; for (int i = 0; i < 4; i++) { bLoop = b[i]; int off = (b.length - 1 - i) * 8; iOutcome += (bLoop & 0xFF) << off; return iOutcome; ... |
int | byteToInteger(byte[] b) byte To Integer int i = 0; i += b[0] & 0xFF; i += b[1] << 8; i += b[2] << 16; i += b[3] << 24; return i; |