> Hmm..to clarify:  the serialized form documentation mentions two fields
> which it then omits from its writeObject() / readObject() specification.  If
> those fields aren't written out to the object stream, then are they
> unimportant?  And if so, why does the documentation mention them?

Okay, I didn't see those two fields when I was looking the first time. 
I'm not exactly sure what loadFactor is, but threshold is described..
These ARE important to serialize.  And in fact, your implementation should
try to use them.

As for serializing them.  Hmmm.. What I would suggest doing is setting up
a Sun Hashtable and then a Test class of your own.  Have the Sun app
serialize its Hashtable, and your test Class read from that stream.   You
can manipulate the contents of the Hashtable (Having no values for
example, and set the capacity to something recognizable), and see if you
cant reverse engineer where the loadFactor and threshold are coming down
the stream.  

To be honest, I don't think you even need to do this.  I don't have a
crystal clear idea on how serialization works.  Somebody help me out here,
but I think Java will serialize the fields listed in the Serialized Form
automatically, then call the Hashtable's read/writeObject methods to
handle the rest.

        Scott


Reply via email to