Here you can find the source of bytes2IntArray(byte[] bytes)
public static int[] bytes2IntArray(byte[] bytes)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] bytes2IntArray(byte[] bytes) { if (bytes == null || bytes.length < 4) { return new int[0]; }//from ww w. j a va 2 s . c o m int[] array = new int[bytes.length / 4]; int byteIndex = 0; int arrayIndex = 0; while (byteIndex < bytes.length) { int v = bytes[byteIndex++] & 0xff; v <<= 8; v |= (bytes[byteIndex++] & 0xff); v <<= 8; v |= (bytes[byteIndex++] & 0xff); v <<= 8; v |= (bytes[byteIndex++] & 0xff); array[arrayIndex++] = v; } return array; } }