Android Byte Array to Int Convert byte2int(byte[] b)

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

Description

byteint

License

Open Source License

Declaration

public static int byte2int(byte[] b) 

Method Source Code

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

public class Main {

    public static int byte2int(byte[] b) {
        return (0xFF & b[0]) << 24 | (0xFF & b[1]) << 16
                | (0xFF & b[2]) << 8 | (0xFF & b[3]) << 0;
    }//from   www  .  j a v  a 2 s.  c  o m
}

Related

  1. toInteger(byte[] b, int pos)
  2. toInteger(byte[] b, int pos, int width)
  3. toInts(byte... bytes)
  4. byteArrayToInt(byte[] b)
  5. bytes2int(byte[] data)
  6. byteArray2Int(byte[] bs)
  7. byteArrayToInt(byte[] b)
  8. toIntegerArray(byte[] input, int offset, int len)
  9. toIntegerArray(byte[] input, int offset, int len, int[] output, int outputOffset)