Java tutorial
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; public class Main { private static IntBuffer newIntBuffer(int size) { ByteBuffer buffer = ByteBuffer.allocateDirect(size); buffer.order(ByteOrder.LITTLE_ENDIAN); return buffer.asIntBuffer(); } }