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
Automated and abstract solution is to write the sample to DataOutput and see the resulted size.