I want store a list of doubles and ints to a ByteBuffer, which asks for a size to allocate. I\'d like to write something like C\'s syntax
int size=numDouble*size
The size in Java is always the same. You can hardcode it but you only need to do this because you are working with bytes in a ByteBuffer. If you use double[] or DoubleBuffer you don't need these.
double[]
DoubleBuffer