Here you can find the source of allocateDirectInt(int size)
public static IntBuffer allocateDirectInt(int size)
//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 allocateDirectInt(int size) { ByteBuffer bb = ByteBuffer.allocateDirect(size * 4); bb.order(ByteOrder.nativeOrder()); return bb.asIntBuffer(); }// w w w . j a va2s. c o m }