Here you can find the source of toInts(byte[] src, int srcOffset, int[] dst, int dstOffset, int length)
public static void toInts(byte[] src, int srcOffset, int[] dst, int dstOffset, int length)
//package com.java2s; public class Main { public static void toInts(byte[] src, int srcOffset, int[] dst, int dstOffset, int length) { if (length < 0) throw new IllegalArgumentException( "length must be >= 0, length = " + length); for (int i = dstOffset; i < dstOffset + length; i++) { dst[i] = getInt(src, srcOffset); srcOffset += 4;// w w w.j a va2 s. co m } } public static final int getInt(byte[] data, int position) { int a = data[position + 0] & 255; int b = data[position + 1] & 255; int c = data[position + 2] & 255; int d = data[position + 3] & 255; return makefourcc(a, b, c, d); } public static final int makefourcc(int c0, int c1, int c2, int c3) { return c0 | (c1 << 8) | (c2 << 16) | (c3 << 24); } }