toByteArraySecure

Serializes this object with Java serialization; identical to toByteArray, kept for source compatibility.