I've been searching for a way to convert a FloatBuffer array to a byte array. I have found a way to convert a FloatBuffer object to byte[]: convert from floatbuffer to byte[]
But after searching the Internet for several hours I haven't been able to find something equivalent to convert from FloatBuffer[].
And to do the inverse, to convert from byte[] to FloatBuffer[], I've only found this:
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(floatBufferObject);
byte [] descriptorsBytes = bos.toByteArray();
But it seems a little strange there is not a simpler way to do this. Maybe I'm missing something very obvious, maybe I should convert the FloatBuffer array to other type that is simpler to convert to a byte array?