Here you can find the source of createIntBuffer(int count)
public static IntBuffer createIntBuffer(int count)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; public class Main { public static IntBuffer createIntBuffer(int count) { ByteBuffer data = ByteBuffer.allocateDirect(count * 4); data.order(ByteOrder.nativeOrder()); IntBuffer p1 = data.asIntBuffer(); return p1; }//w ww . j av a 2 s . c om }