Java ByteBuffer Allocate allocateDirectInt(int size)

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

Description

allocate Direct Int

License

Open Source License

Declaration

public static IntBuffer allocateDirectInt(int size) 

Method Source Code

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

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

import java.nio.IntBuffer;

public class Main {
    public static IntBuffer allocateDirectInt(int size) {
        ByteBuffer bb = ByteBuffer.allocateDirect(size * 4);
        bb.order(ByteOrder.nativeOrder());
        return bb.asIntBuffer();
    }// w  w w  . j  a  va2s.  c o  m
}

Related

  1. allocate(int size)
  2. allocate(int size)
  3. allocateBuffer(int size, boolean isDirect)
  4. allocateDirect(int capacity)
  5. allocateDirectBuffer(int size)
  6. allocateDoubles(final int howmany, final int SIZE)
  7. allocateFloats(final int howmany, final int SIZE)
  8. allocateInt()
  9. allocateInts(final int[] intarray, final int SIZE)