It's useful to return this object when multiple serializable objects are to be composed into a single ByteBuffer
or byte[]. This allows serializable objects to report their size so that callers may get the total size of all
objects and allocate a sufficiently large ByteBuffer/byte[]. Then the store() methods may be used to serialize.
This avoids extra copies and wasted memory/gc pressure in the case of just returning a byte[].
The getSerializedSize() method is provided because an object may need to use private data in order to calculate
the size needed.