Here you can find the source of toIntArray(byte[] byteArray)
public static int[] toIntArray(byte[] byteArray)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { public static int[] toIntArray(byte[] byteArray) { int times = Integer.SIZE / Byte.SIZE; int[] doubles = new int[byteArray.length / times]; for (int i = 0; i < doubles.length; i++) { doubles[i] = ByteBuffer.wrap(byteArray, i * times, times).getInt(); }/*w w w.j ava 2 s . c o m*/ return doubles; } }