01: // Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
02:
03: package org.xbill.DNS;
04:
05: /**
06: * Pointer Record - maps a domain name representing an Internet Address to
07: * a hostname.
08: *
09: * @author Brian Wellington
10: */
11:
12: public class PTRRecord extends SingleCompressedNameBase {
13:
14: PTRRecord() {
15: }
16:
17: Record getObject() {
18: return new PTRRecord();
19: }
20:
21: /**
22: * Creates a new PTR Record with the given data
23: * @param target The name of the machine with this address
24: */
25: public PTRRecord(Name name, int dclass, long ttl, Name target) {
26: super (name, Type.PTR, dclass, ttl, target, "target");
27: }
28:
29: /** Gets the target of the PTR Record */
30: public Name getTarget() {
31: return getSingleName();
32: }
33:
34: }
|