Android Byte Array to Int Convert getInt(byte[] bb, int index)

Here you can find the source of getInt(byte[] bb, int index)

Description

get Int

Declaration

public static int getInt(byte[] bb, int index) 

Method Source Code

//package com.java2s;

public class Main {
    public static int getInt(byte[] bb, int index) {
        return (int) ((((bb[index + 0] & 0xff) << 24)
                | ((bb[index + 1] & 0xff) << 16)
                | ((bb[index + 2] & 0xff) << 8) | ((bb[index + 3] & 0xff) << 0)));
    }/*from   ww  w . ja v a  2s  . c om*/
}

Related

  1. byteToUint(byte b)
  2. bytes2uint(byte[] bytes, int from, int to)
  3. bytesBE2int(byte[] b, int off)
  4. bytesBE2ints(byte[] b)
  5. getInt(byte b)
  6. getInt(byte[] bb, int index)
  7. getInt(byte[] bb, int index)
  8. getInt(byte[] buf, boolean bigEndian)
  9. getInt(byte[] buf, int pos, boolean bigEndian)