Java Byte Array to Unsigned Int bytesToUIntLE(byte[] data)

Here you can find the source of bytesToUIntLE(byte[] data)

Description

bytes To U Int LE

License

Open Source License

Declaration

public static int bytesToUIntLE(byte[] data) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int bytesToUIntLE(byte[] data) {
        return bytesToUIntLE(data, 0, data.length);
    }/*from  w ww .  ja  v  a2  s. c o  m*/

    public static int bytesToUIntLE(byte[] data, int offset, int length) {
        int i = offset + length;
        int value = 0;
        while (--i >= offset) {
            value <<= 8;
            value |= data[i] & 0xFF;
        }
        return value;
    }
}

Related

  1. bytesToUint(byte first, byte second, byte third, byte fourth)
  2. bytesToUInt(final byte[] bytes, final int position, final int length, final int bitShiftStart, final int bitShitIncrement)
  3. bytesToUIntLong(byte[] bytes, int index)
  4. bytesToUnsignedInt(byte ib1, byte ib2)
  5. bytesToUnsignedInts(byte[] bytes)
  6. bytesToUshort(byte b1, byte b2)