Here you can find the source of newDirectByteBuffer(int size)
protected static ByteBuffer newDirectByteBuffer(int size)
//package com.java2s; import java.nio.*; public class Main { protected static ByteBuffer newDirectByteBuffer(int size) { return ByteBuffer.allocateDirect(size).order( ByteOrder.nativeOrder()); }/*from w w w .j av a 2 s . c o m*/ }