Java Byte Array to Int bytesToInt(final byte[] b)

Here you can find the source of bytesToInt(final byte[] b)

Description

bytes To Int

License

Open Source License

Declaration

public static int bytesToInt(final byte[] b) 

Method Source Code

//package com.java2s;

public class Main {
    public static int bytesToInt(final byte[] b) {
        return b[3] & 0xFF | (b[2] & 0xFF) << 8 | (b[1] & 0xFF) << 16 | (b[0] & 0xFF) << 24;
    }/*from  w w w  .  j  a va  2 s. com*/
}

Related

  1. bytesToInt(byte[] data)
  2. bytesToInt(byte[] data)
  3. bytesToInt(byte[] data)
  4. bytesToInt(byte[] value)
  5. bytesToInt(final byte[] arr)
  6. bytesToInt(final byte[] buf, final int offset)
  7. bytesToInt(final byte[] bytes)
  8. bytesToInt(final byte[] bytes)
  9. bytesToInt(final byte[] bytes, final int position, final int length, final int bitShiftStart, final int bitShitIncrement)