| java.lang.Object org.xbill.DNS.Zone
Zone | public class Zone (Code) | | A DNS Zone. This encapsulates all data related to a Zone, and provides
convenient lookup methods.
author: Brian Wellington |
Inner Class :class ZoneIterator implements Iterator | |
Constructor Summary | |
public | Zone(Name zone, String file) Creates a Zone from the records in the specified master file. | public | Zone(Name zone, Record[] records) Creates a Zone from an array of records. | public | Zone(ZoneTransferIn xfrin) Creates a Zone by doing the specified zone transfer. | public | Zone(Name zone, int dclass, String remote) Creates a Zone by performing a zone transfer to the specified host. |
PRIMARY | final public static int PRIMARY(Code) | | A primary zone
|
SECONDARY | final public static int SECONDARY(Code) | | A secondary zone
|
Zone | public Zone(Name zone, String file) throws IOException(Code) | | Creates a Zone from the records in the specified master file.
Parameters: zone - The name of the zone. Parameters: file - The master file to read from. See Also: Master |
Zone | public Zone(Name zone, Record[] records) throws IOException(Code) | | Creates a Zone from an array of records.
Parameters: zone - The name of the zone. Parameters: records - The records to add to the zone. See Also: Master |
AXFR | public Iterator AXFR()(Code) | | Returns an Iterator over the RRsets in the zone that can be used to
construct an AXFR response. This is identical to
Zone.iterator except
that the SOA is returned at the end as well as the beginning.
|
addRRset | public void addRRset(RRset rrset)(Code) | | Adds an RRset to the Zone
Parameters: rrset - The RRset to be added See Also: RRset |
addRecord | public void addRecord(Record r)(Code) | | Adds a Record to the Zone
Parameters: r - The record to be added See Also: Record |
findExactMatch | public RRset findExactMatch(Name name, int type)(Code) | | Looks up Records in the zone, finding exact matches only.
Parameters: name - The name to look up Parameters: type - The type to look up The matching RRset See Also: RRset |
findRecords | public SetResponse findRecords(Name name, int type)(Code) | | Looks up Records in the Zone. This follows CNAMEs and wildcards.
Parameters: name - The name to look up Parameters: type - The type to look up A SetResponse object See Also: SetResponse |
getDClass | public int getDClass()(Code) | | Returns the Zone's class
|
getNS | public RRset getNS()(Code) | | Returns the Zone origin's NS records
|
getOrigin | public Name getOrigin()(Code) | | Returns the Zone's origin
|
iterator | public Iterator iterator()(Code) | | Returns an Iterator over the RRsets in the zone.
|
removeRecord | public void removeRecord(Record r)(Code) | | Removes a record from the Zone
Parameters: r - The record to be removed See Also: Record |
toMasterFile | public String toMasterFile()(Code) | | Returns the contents of the Zone in master file format.
|
toString | public String toString()(Code) | | Returns the contents of the Zone as a string (in master file format).
|
|
|