Java ByteBuffer Create newDirectByteBuffer(int size)

Here you can find the source of newDirectByteBuffer(int size)

Description

new Direct Byte Buffer

License

Open Source License

Declaration

protected static ByteBuffer newDirectByteBuffer(int size) 

Method Source Code

//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*/
}

Related

  1. newByteArrayFromByteBuffer(ByteBuffer buf)
  2. newByteBuffer(int bufferSize, boolean direct)
  3. newByteBuffer(int len)
  4. newByteBuffer(int nbElements)
  5. newByteBuffer(int theSize)