813 |
|
} |
814 |
|
|
815 |
|
/** |
816 |
< |
* Save the state of the list to a stream (i.e., serialize it). |
816 |
> |
* Saves the state of the list to a stream (that is, serializes it). |
817 |
|
* |
818 |
|
* @serialData The length of the array backing the list is emitted |
819 |
|
* (int), followed by all of its elements (each an Object) |
823 |
|
private void writeObject(java.io.ObjectOutputStream s) |
824 |
|
throws java.io.IOException{ |
825 |
|
|
826 |
– |
// Write out element count, and any hidden stuff |
826 |
|
s.defaultWriteObject(); |
827 |
|
|
828 |
|
Object[] elements = getArray(); |
836 |
|
} |
837 |
|
|
838 |
|
/** |
839 |
< |
* Reconstitute the list from a stream (i.e., deserialize it). |
839 |
> |
* Reconstitutes the list from a stream (that is, deserializes it). |
840 |
> |
* |
841 |
|
* @param s the stream |
842 |
|
*/ |
843 |
|
private void readObject(java.io.ObjectInputStream s) |
844 |
|
throws java.io.IOException, ClassNotFoundException { |
845 |
|
|
846 |
– |
// Read in size, and any hidden stuff |
846 |
|
s.defaultReadObject(); |
847 |
|
|
848 |
|
// bind to new lock |