Android ByteBuffer Create createByteBuffer(int size)

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

Description

create Byte Buffer

Declaration

public static ByteBuffer createByteBuffer(int size) 

Method Source Code

//package com.java2s;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class Main {
    public static ByteBuffer createByteBuffer(int size) {
        ByteBuffer bf = ByteBuffer.allocateDirect(size);
        return bf.order(ByteOrder.nativeOrder());
    }// w  w w. ja va2  s .c om
}

Related

  1. newUnsafeByteBuffer(ByteBuffer buffer)
  2. newUnsafeByteBuffer(int numBytes)
  3. createByteBuffer(byte[] data)
  4. createByteBuffer(int capacity)
  5. createByteBuffer(int count)
  6. createByteBuffer(int size)
  7. createDirectByteBuffer( final int capacity, final ByteBuffer previous)
  8. createDirectByteBuffer(final int capacity)
  9. arr2ByteBuffer(byte [] arr)