Java tutorial
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; public class Main { public static IntBuffer newIntBuffer(int numInts) { ByteBuffer buffer = ByteBuffer.allocate(numInts * 4); buffer.order(ByteOrder.nativeOrder()); return buffer.asIntBuffer(); } }