Iterator iterator = h.getAllHeaders(); while (iterator.hasNext()) { MimeHeader hdr = (MimeHeader) iterator.next(); addHeader(hdr.getName(), hdr.getValue()); }
int size = 0; Iterator iterator = getAllHeaders(); while (iterator.hasNext()) { iterator.next(); size++; } return size;
int size = in.readInt(); for (int i = 0; i < size; i++) { Object key = in.readObject(); Object value = in.readObject(); addHeader((String)key, (String)value); }
out.writeInt(getHeaderSize()); Iterator iterator = getAllHeaders(); while (iterator.hasNext()) { MimeHeader hdr = (MimeHeader) iterator.next(); out.writeObject(hdr.getName()); out.writeObject(hdr.getValue()); }