Exemple #1
0
 private void nodeToString(StringBuffer sb, Object node) {
   RRset[] sets = allRRsets(node);
   for (int i = 0; i < sets.length; i++) {
     RRset rrset = sets[i];
     Iterator it = rrset.rrs();
     while (it.hasNext()) sb.append(it.next() + "\n");
     it = rrset.sigs();
     while (it.hasNext()) sb.append(it.next() + "\n");
   }
 }
Exemple #2
0
 /** Returns the contents of a Zone in master file format. */
 public String toMasterFile() {
   Iterator znames = names();
   StringBuffer sb = new StringBuffer();
   while (znames.hasNext()) {
     Name name = (Name) znames.next();
     TypeMap tm = findName(name);
     Object[] sets = tm.getAll();
     for (int i = 0; i < sets.length; i++) {
       RRset rrset = (RRset) sets[i];
       Iterator it = rrset.rrs();
       while (it.hasNext()) sb.append(it.next() + "\n");
       it = rrset.sigs();
       while (it.hasNext()) sb.append(it.next() + "\n");
     }
   }
   return sb.toString();
 }