-
readObject
private void readObject(ObjectInputStream s)
throws IOException,
ClassNotFoundException
Reconstitute the HashMap instance from a stream (i.e.,
deserialize it).
- Throws:
IOException
ClassNotFoundException
-
writeObject
private void writeObject(ObjectOutputStream s)
throws IOException
Save the state of the HashMap instance to a stream (i.e.,
serialize it).
- Serial Data:
- The capacity of the HashMap (the length of the
bucket array) is emitted (int), followed by the
size of the HashMap (the number of key-value
mappings), followed by the key (Object) and value (Object)
for each key-value mapping represented by the HashMap
The key-value mappings are emitted in the order that they
are returned by entrySet().iterator().
- Throws:
IOException