private void readObject ( java . io . ObjectInputStream s ) throws java . io . IOException , ClassNotFoundException { s . defaultReadObject ( ) ; // Read in size and allocate array int size = s . readInt ( ) ; allocateElements ( size ) ; head = 0 ; tail = size ; // Read in all elements in the proper order. for ( int i = 0 ; i < size ; i ++ ) elements [ i ] = s . readObject ( ) ; }
Deserialize this queue .