Serialize an object into an entry buffer. The fixed serialization header is not included in the output data to save space, and therefore to deserialize the data the complementary {@link #entryToObject} methodmust be used. {@link SerialOutput} is used to serialize the object.
Note that this method sets the DatabaseEntry offset property to a non-zero value and the size property to a value less than the length of the byte array.
@param object is the input deserialized object.
@param entry is the output serialized entry.
@throws IllegalArgumentException if the object is not an instance of thebase class for this binding, including if the object is null and a non-null base class was specified.