Java Byte Array to Int byte2Int(byte bytes[])

Here you can find the source of byte2Int(byte bytes[])

Description

byte Int

License

Open Source License

Declaration

public static int byte2Int(byte bytes[]) 

Method Source Code

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

public class Main {
    public static int byte2Int(byte bytes[]) {
        int num = bytes[0] & 0xFF;
        num |= ((bytes[1] << 8) & 0xFF00);
        num |= ((bytes[2] << 16) & 0xFF0000);
        num |= ((bytes[3] << 24) & 0xFF000000);
        return num;
    }//from   w  ww . j  a  v a  2  s  .  c om
}

Related

  1. arr2int(byte[] arr, int start)
  2. bufferToInt(byte[] ioBuffer)
  3. byte2int(byte b[], int offset)
  4. byte2Int(byte[] b)
  5. byte2int(final byte[] arr)
  6. byte2int(int[] output, byte[] input, int ioff, int len)
  7. byte2int2(byte[] src, int height, int width)