[jdom-interest] TODO serialization [eg]

Joseph Bowbeer jozart at csi.com
Tue Apr 17 11:49:23 PDT 2001

Alex Rosen writes:

> Isn't that what Externalizable is for?

According to the magic spec, Externalizable is what you'd extend if you
wanted to use something like PDF or XML as the serialization format.  I
don't think Externalizable is easy to extend in a subclass (i.e., it's all
or nothing), but I'm not sure about that.

The writeObject method, on the other hand, is passed an ObjectOutputStream,
which provides the powerful defaultWriteObject extensibility mechanism, as
well as a set of convenient write* methods.


----- original message -----
From: Alex Rosen arosen at silverstream.com
Date: Tue, 17 Apr 2001 09:59:03 -0400

> Hiding the implementation from the serialized form is a matter of
> declaring most if not all fields transient and adding some custom
> code to the readObject and writeObject methods.

Isn't that what Externalizable is for? That way you don't have to remember
to make all fields transient. Or is there something in this magic book that
says that Externalizable is bad? :)

More information about the jdom-interest mailing list