Here you can find the source of createIntBuffer(int size)
public static IntBuffer createIntBuffer(int size)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; public class Main { public static IntBuffer createIntBuffer(int size) { ByteBuffer bf = ByteBuffer.allocateDirect(size * 4); return bf.order(ByteOrder.nativeOrder()).asIntBuffer(); }//w w w . j a v a2s .co m }