Here you can find the source of unsignedIntToInt(byte[] b)
Parameter | Description |
---|---|
b | byte array |
public static final int unsignedIntToInt(byte[] b)
//package com.java2s; public class Main { /**//from w w w . j ava2s .c o m * Convert a byte array to an unsigned int value * * @param b * byte array * @return int value */ public static final int unsignedIntToInt(byte[] b) { int i = 0; i |= b[0] & 0xFF; i <<= 8; i |= b[1] & 0xFF; i <<= 8; i |= b[2] & 0xFF; i <<= 8; i |= b[3] & 0xFF; return i; } }