Here you can find the source of newIntBuffer(int numInts)
public static IntBuffer newIntBuffer(int numInts)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; public class Main { public static IntBuffer newIntBuffer(int numInts) { ByteBuffer buffer = ByteBuffer.allocateDirect(numInts * 4); buffer.order(ByteOrder.nativeOrder()); return buffer.asIntBuffer(); }/*from www . jav a2s. co m*/ }