Here you can find the source of putInts(int[] fromInts, byte[] toBytes)
public static void putInts(int[] fromInts, byte[] toBytes)
//package com.java2s; //License from project: Open Source License public class Main { public static final int INT_SIZE = 4; public static void putInts(int[] fromInts, byte[] toBytes) { for (int intInd = 0; intInd < fromInts.length; ++intInd) { putInt(fromInts[intInd], intInd * INT_SIZE, toBytes); }//ww w . java2s .c om } public static void putInt(int value, int offset, byte[] byteArr) { byteArr[offset + 0] = (byte) (value >>> 24); byteArr[offset + 1] = (byte) (value >>> 16); byteArr[offset + 2] = (byte) (value >>> 8); byteArr[offset + 3] = (byte) (value >>> 0); } }