toByteArray

Serializes this object with Java serialization.

Serializing is safe; deserializing untrusted bytes is not, so read the result back with toObjectSecure.