code: private void writeObject(java.io.ObjectOutputStream s)
          throws java.io.IOException {
  
          fullyLock();
          try {
              // Write out any hidden stuff, plus capacity
              s.defaultWriteObject();
  
              // Write out all elements in the proper order.
              for (Node<E> p = head.next; p != null; p = p.next)
                  s.writeObject(p.item);
  
              // Use trailing null as sentinel
              s.writeObject(null);
          } finally {
              fullyUnlock();
          }
      }
docs: Saves this queue to a stream (that is, serializes it).
  
  @param s the stream
  @throws java.io.IOException if an I/O error occurs
  @serialData The capacity is emitted (int), followed by all of
  its elements (each an {@code Object}) in the proper order,
  followed by a null