Android IntBuffer Create createIntBuffer(int size)

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

Description

create Int Buffer

Declaration

public static IntBuffer createIntBuffer(int size) 

Method Source Code

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

import java.nio.IntBuffer;

public class Main {
    public static IntBuffer createIntBuffer(int size) {
        ByteBuffer bf = ByteBuffer.allocateDirect(size * 4);
        return bf.order(ByteOrder.nativeOrder()).asIntBuffer();
    }//w  w  w  . j  a v a2s  .co m
}

Related

  1. copy(float[] src, IntBuffer dst, int numFloats, int offset)
  2. newIntBuffer(int numInts)
  3. newIntBuffer(int numInts)
  4. createIntBuffer(int capacity)
  5. createIntBuffer(int count)
  6. createIntBuffer(int[] data)
  7. getIntegerBuffer(int[] list)
  8. makeIntBuffer(int size)
  9. makeIntBuffer(int[] arr)