public static int byteArraytoInt(byte[] bRefArr) {
		if (bRefArr == null) {
			return 0;
		}
		if (bRefArr.length < 4) {
			byte[] bArr = new byte[4];
			for (int i = 0; i < 4 - bRefArr.length; i++) {
				bArr[i] = 0x00;
			}
			System.arraycopy(bRefArr, 0, bArr, 4 - bRefArr.length,
					bRefArr.length);
			bRefArr = bArr;
		}
		int mask = 0xff;
		int temp = 0;
		int n = 0;
		for (int i = 0; i < 4; i++) {
			n <<= 8;
			temp = bRefArr[i] & mask;
			n |= temp;
		}
		return n;
	}