-
-
- serialVersionUID:
- -1L
-
Serialization Methods
-
readObject
Reconstitutes this LinkedList
instance from a stream (that is,
deserializes it).
- Serial Data:
- first, the size of the list is read. Then all the node items
are read and stored in the deserialization order, that is the
same order as in serialization.
- Parameters:
s
- the object input stream.
- Throws:
IOException
- if I/O fails.
ClassNotFoundException
- if the class is not found.
-
writeObject
Saves the state of this LinkedList
instance to a stream (that is,
serializes it).
- Serial Data:
- The size of the list (the number of elements it
contains) is emitted (int), followed by all of its
elements (each an Object) in the proper order.
- Parameters:
s
- the object output stream.
- Throws:
IOException
- if the I/O fails.
-