private void writeObject ( final ObjectOutputStream out ) throws IOException { out . defaultWriteObject ( ) ; out . writeInt ( size ( ) ) ; for ( final E e : this ) { out . writeObject ( e ) ; } }
Write the queue out using a custom routine .