There is additional overhead compared to {@link FieldSerializer}. A header is output the first time an object of a given type is serialized. The header consists of an int for the number of fields, then a String for each field name. Also, to support skipping the bytes for a field that no longer exists, for each field value an int is written that is the length of the value in bytes.
Note that the field data is identified by name. The situation where a super class has a field with the same name as a subclass must be avoided.
@author Nathan Sweet
|
|
|
|