Here you can find the source of getInts(int[] toInts, byte[] fromBytes, int fromOffset)
public static void getInts(int[] toInts, byte[] fromBytes, int fromOffset)
//package com.java2s; //License from project: Open Source License public class Main { public static final int INT_SIZE = 4; public static void getInts(int[] toInts, byte[] fromBytes) { for (int intInd = 0; intInd < toInts.length; ++intInd) { final int fromInt = getInt(intInd * 4, fromBytes); int toInt = fromInt; toInts[intInd] = toInt;//from w w w . ja va2 s . co m } } public static void getInts(int[] toInts, byte[] fromBytes, int fromOffset) { for (int intInd = 0; intInd < toInts.length; ++intInd) { final int fromInt = getInt(fromOffset + (intInd * INT_SIZE), fromBytes); int toInt = fromInt; toInts[intInd] = toInt; } } public static int getInt(int offset, byte[] fromBytes) { final int toInt; toInt = ((0xff & fromBytes[offset + 0]) << 24) | ((0xff & fromBytes[offset + 1]) << 16) | ((0xff & fromBytes[offset + 2]) << 8) | ((0xff & fromBytes[offset + 3]) << 0); return toInt; } }