Java FloatBuffer Create createFloatBuffer(int limit)

Here you can find the source of createFloatBuffer(int limit)

Description

create Float Buffer

License

Open Source License

Declaration

static public FloatBuffer createFloatBuffer(int limit) 

Method Source Code


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

import java.nio.*;

public class Main {
    static public FloatBuffer createFloatBuffer(int limit) {
        FloatBuffer buf = ByteBuffer.allocateDirect(4 * limit).order(ByteOrder.nativeOrder()).asFloatBuffer();
        buf.clear();//from   w  ww .j ava2  s  .c om
        return buf;
    }
}

Related

  1. createFloatBuffer(float[] array)
  2. createFloatBuffer(FloatBuffer buffer)
  3. createFloatBuffer(int numFloats)
  4. createFloatBuffer(int size)
  5. createFloatBufferOnHeap(final int size)
  6. newFloatBuffer(final int theSize)