private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  s.writeInt(Math.max(2,size + 1));
  for (int i=0; i < size; i++)   s.writeObject(queue[i]);
}

private void writeObject ( java . io . ObjectOutputStream s ) throws java . io . IOException { s . defaultWriteObject ( ) ; s . writeInt ( Math . max ( 2 , size + 1 ) ) ; for ( int i = 0 ; i < size ; i ++ ) s . writeObject ( queue [ i ] ) ; }
saves this queue to a stream ( that is , serializes it ) .
