diff options
Diffstat (limited to 'src/org/xbill/DNS/PTRRecord.java')
-rw-r--r-- | src/org/xbill/DNS/PTRRecord.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/org/xbill/DNS/PTRRecord.java b/src/org/xbill/DNS/PTRRecord.java new file mode 100644 index 0000000..89be578 --- /dev/null +++ b/src/org/xbill/DNS/PTRRecord.java @@ -0,0 +1,38 @@ +// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org) + +package org.xbill.DNS; + +/** + * Pointer Record - maps a domain name representing an Internet Address to + * a hostname. + * + * @author Brian Wellington + */ + +public class PTRRecord extends SingleCompressedNameBase { + +private static final long serialVersionUID = -8321636610425434192L; + +PTRRecord() {} + +Record +getObject() { + return new PTRRecord(); +} + +/** + * Creates a new PTR Record with the given data + * @param target The name of the machine with this address + */ +public +PTRRecord(Name name, int dclass, long ttl, Name target) { + super(name, Type.PTR, dclass, ttl, target, "target"); +} + +/** Gets the target of the PTR Record */ +public Name +getTarget() { + return getSingleName(); +} + +} |