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