Java ByteBuffer Create createByteBuffer(int byteCount)

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

Description

create Byte Buffer

License

Open Source License

Declaration

public static ByteBuffer createByteBuffer(int byteCount) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class Main {
    private static final ByteOrder NATIVE_BYTE_ORDER = ByteOrder.nativeOrder();

    public static ByteBuffer createByteBuffer(int byteCount) {
        return ByteBuffer.allocate(byteCount).order(NATIVE_BYTE_ORDER);
    }//from ww  w . j ava  2s.  c o  m
}

Related

  1. allocateByteBuffer(final int bytes)
  2. allocateByteBuffer(int capacity)
  3. createByteBuffer(byte... data)
  4. createByteBuffer(byte... values)
  5. createByteBuffer(byte[] data)
  6. createByteBuffer(int capacity)
  7. createByteBuffer(int capacity)
  8. createByteBuffer(int size)
  9. createByteBuffer(int size)