Type Reason Java.IO.IOException if an error occurs while writing to the target stream. Java.IO.NotActiveException if this method is not called from writeObject().
Default method to write objects to this stream. Serializable fields defined in the object's class and superclasses are written to the output stream.