Java IntBuffer Create createIntBuffer(int capacity)

Here you can find the source of createIntBuffer(int capacity)

Description

create Int Buffer

License

Open Source License

Declaration

public static IntBuffer createIntBuffer(int capacity) 

Method Source Code


//package com.java2s;
import java.nio.*;

public class Main {
    public static IntBuffer createIntBuffer(int capacity) {
        return createByteBuffer(capacity * Integer.BYTES).asIntBuffer();
    }/* www . j av a 2  s  .  c om*/

    public static ByteBuffer createByteBuffer(int capacity) {
        return ByteBuffer.allocateDirect(capacity * Byte.BYTES).order(ByteOrder.nativeOrder());
    }
}

Related

  1. createIntBuffer(final int... data)
  2. createIntBuffer(final int... data)
  3. createIntBuffer(int size)
  4. createIntBuffer(int size)
  5. createIntBuffer(int size)
  6. createIntBuffer(int... data)