code: private void readObject(java.io.ObjectInputStream s)
          throws java.io.IOException, ClassNotFoundException {
          // Read in capacity, and any hidden stuff
          s.defaultReadObject();
  
          count.set(0);
          last = head = new Node<E>(null);
  
          // Read in all elements and place in queue
          for (;;) {
              @SuppressWarnings("unchecked")
              E item = (E)s.readObject();
              if (item == null)
                  break;
              add(item);
          }
      }
docs: Reconstitutes this queue from a stream (that is, deserializes it).
  @param s the stream
  @throws ClassNotFoundException if the class of a serialized object
  could not be found
  @throws java.io.IOException if an I/O error occurs