Serializes an object into a byte array.
Serializes an object into a byte array.
the object to be serialized
byte array of the serialized object
if an error occurs
Internal write method to be implemented.
Internal write method to be implemented.
the object to be serialized
byte array of the serialized object