public static int toInt(byte[] bRefArr) { int iOutcome = 0; byte bLoop; for ( int i =0; i<4 ; i++) { bLoop = bRefArr[i]; iOutcome+= (bLoop & 0xFF) << (8 * i); } return iOutcome; }