Java Byte Array to Int Bytes2Uint32(byte[] sour, int offset)

Here you can find the source of Bytes2Uint32(byte[] sour, int offset)

Description

Bytes Uint

License

Open Source License

Declaration

public static long Bytes2Uint32(byte[] sour, int offset) 

Method Source Code

//package com.java2s;

public class Main {

    public static long Bytes2Uint32(byte[] sour, int offset) {
        return Bytes2Int32(sour, offset) & 0xFFFFFFFFL;
    }/*from  w  w  w. j a  v a  2 s  . c  om*/

    public static int Bytes2Int32(byte[] sour, int offset) {
        return (((sour[offset] << 24) & 0xFF000000) | ((sour[offset + 1] << 16) & 0x00FF0000)
                | ((sour[offset + 2] << 8) & 0x0000FF00) | (sour[offset + 3] & 0x000000FF));
    }
}

Related

  1. Bytes2Int64(byte[] sour, int offset)
  2. bytes2IntArray(byte[] bytes)
  3. bytes2Integer(byte[] byteVal)
  4. bytes2LengthToIntLowOrder(byte[] intBytes)
  5. bytes2ToInt(byte[] inputValues)
  6. bytesToInt(byte a)
  7. bytesToInt(byte A, byte B, byte C, byte D)
  8. bytesToInt(byte abyte0[], int i, int j)
  9. bytesToInt(byte b1, byte b2, byte b3, byte b4)