| 93 | } |
| 94 | |
| 95 | private void |
| 96 | validate() throws IOException { |
| 97 | originNode = exactName(origin); |
| 98 | if (originNode == null) |
| 99 | throw new IOException(origin + ": no data specified"); |
| 100 | |
| 101 | RRset rrset = oneRRset(originNode, Type.SOA); |
| 102 | if (rrset == null || rrset.size() != 1) |
| 103 | throw new IOException(origin + |
| 104 | ": exactly 1 SOA must be specified"); |
| 105 | Iterator it = rrset.rrs(); |
| 106 | SOA = (SOARecord) it.next(); |
| 107 | |
| 108 | NS = oneRRset(originNode, Type.NS); |
| 109 | if (NS == null) |
| 110 | throw new IOException(origin + ": no NS set specified"); |
| 111 | } |
| 112 | |
| 113 | private final void |
| 114 | maybeAddRecord(Record record) throws IOException { |