out.writeObject(iter.next());
out.writeInt(-1); } else { out.writeInt(l.size()); Iterator iter = l.iterator(); while (iter.hasNext()) { out.writeObject(iter.next()); }
   private void writeList(List l, ObjectOutput out) throws IOException   {      out.writeInt(l.size());      Iterator iter = l.iterator();      while (iter.hasNext())      {         out.writeObject(iter.next());      }   }