Here you can find the source of toIntA(byte[] data)
public static int[] toIntA(byte[] data)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] toIntA(byte[] data) { if (data == null || data.length % 4 != 0) return null; // ---------- int[] ints = new int[data.length / 4]; for (int i = 0; i < ints.length; i++) ints[i] = toInt(new byte[] { data[(i * 4)], data[(i * 4) + 1], data[(i * 4) + 2], data[(i * 4) + 3], }); return ints; }//from w w w .j av a2 s . c o m public static int toInt(byte[] data) { if (data == null || data.length != 4) return 0x0; // ---------- return (int) ( // NOTE: type cast not necessary for int (0xff & data[0]) << 24 | (0xff & data[1]) << 16 | (0xff & data[2]) << 8 | (0xff & data[3]) << 0); } }