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
A better solution might be to not emulate C syntax and use an ObjectOutputStream with a nested ByteArrayOutputStream to generate a byte array which can then be written to your ByteBuffer.