Exception instantiating FloatBuffer[]
<p>I'm trying to create an array of 144 FloatBuffers so I can easily access each one using an integer to pick which one. No, I don't mean a FloatBuffer 144 long. I'm investigating using a class to contain all the FloatBuffers, but it'll take some time. Any thoughts?</p>

<p>I get</p>

<pre><code>java.lang.ArrayIndexOutOfBoundsException: 0
</code></pre>

<p>on this line, no matter what method I use to try to instantiate the new FloatBuffer INTO the array:</p>

<pre><code>    for(int i=0; i&lt;144;i++){
    vbuffers[i] = BufferUtils.createFloatBuffer(buffervolume*7);
    }
</code></pre>

<p>I also tried this and got the same error:</p>

<pre><code>        vbuffers[i]=FloatBuffer.allocate(buffervolume*7);
</code></pre>

<p>Here is the full relevant code:</p>

<pre><code>public class myclass {

public FloatBuffer[] vbuffers;

public myclass(){
    vbuffers=new FloatBuffer[chunklimit*chunklimit*4];
    for(int i=0; i&lt;144;i++){
    vbuffers[i] = BufferUtils.createFloatBuffer(chunkvolume*7);
    }
}
}
</code></pre>

<p>I would like to add that I ended up using one large FloatBuffer and glbuffersubdata to manage my data and got really great results.</p>
