Java FloatBuffer Create newFloatBuffer(final int theSize)

Here you can find the source of newFloatBuffer(final int theSize)

Description

Creates a FloatBuffer of the given size

License

Open Source License

Parameter

Parameter Description
theSize size for the buffer

Return

FloatBuffer of the given size

Declaration

public static FloatBuffer newFloatBuffer(final int theSize) 

Method Source Code

//package com.java2s;
/*//from  w  ww  .  j  a  v  a2  s.c  o  m
 * Copyright (c) 2013 christianr.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v3
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-3.0.html
 * 
 * Contributors:
 *     christianr - initial API and implementation
 */

import java.nio.FloatBuffer;

public class Main {
    /**
     * Creates a FloatBuffer of the given size
     * 
     * @param theSize
     *            size for the buffer
     * @return FloatBuffer of the given size
     */
    public static FloatBuffer newFloatBuffer(final int theSize) {
        return FloatBuffer.allocate(theSize);
    }
}

Related

  1. createFloatBuffer(FloatBuffer buffer)
  2. createFloatBuffer(int limit)
  3. createFloatBuffer(int numFloats)
  4. createFloatBuffer(int size)
  5. createFloatBufferOnHeap(final int size)
  6. newFloatBuffer(int len)
  7. newFloatBuffer(int numFloats)
  8. newNativeFloatBuffer(int size)
  9. toFloatBuffer(float[] array)