code: public void setFields(XfdfReader xfdf) throws IOException, DocumentException {
          HashMap fd = xfdf.getFields();
          for (Iterator i = fd.keySet().iterator(); i.hasNext();) {
              String f = (String)i.next();
              String v = xfdf.getFieldValue(f);
              if (v != null)
                  setField(f, v);
              List l = xfdf.getListValues(f);
              if (l != null)
              	setListSelection(v, (String[])l.toArray(new String[l.size()]));
          }
      }
docs: Sets the fields by XFDF merging.
  
  @param xfdf the XFDF form
  @throws IOException on error
  @throws DocumentException on error