Java ByteBuffer to Float readFloatArray(ByteBuffer bb, int length)

Here you can find the source of readFloatArray(ByteBuffer bb, int length)

Description

read Float Array

License

Open Source License

Declaration

public static float[] readFloatArray(ByteBuffer bb, int length) 

Method Source Code


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

import java.nio.ByteBuffer;

public class Main {
    public static float[] readFloatArray(ByteBuffer bb, int length) {
        float[] a = new float[length];
        for (int i = 0; i < length; i++) {
            a[i] = bb.getFloat();/*from  www .jav a  2s .  c om*/
        }
        return a;
    }
}

Related

  1. readFloat(ByteBuffer buffer)
  2. readFloats(final ByteBuffer bb, final int length)
  3. toFloat(AudioFormat format, ByteBuffer buf, float[] floatBuf)
  4. toFloat(ByteBuffer buffer)
  5. toFloat(ByteBuffer bytes)