1 // Copyright (c) 1999-2004 Brian Wellington (bwelling (at) xbill.org) 2 3 package org.xbill.DNS; 4 5 /** 6 * Pointer Record - maps a domain name representing an Internet Address to 7 * a hostname. 8 * 9 * @author Brian Wellington 10 */ 11 12 public class PTRRecord extends SingleCompressedNameBase { 13 14 private static final long serialVersionUID = -8321636610425434192L; 15 16 PTRRecord() {} 17 18 Record 19 getObject() { 20 return new PTRRecord(); 21 } 22 23 /** 24 * Creates a new PTR Record with the given data 25 * @param target The name of the machine with this address 26 */ 27 public 28 PTRRecord(Name name, int dclass, long ttl, Name target) { 29 super(name, Type.PTR, dclass, ttl, target, "target"); 30 } 31 32 /** Gets the target of the PTR Record */ 33 public Name 34 getTarget() { 35 return getSingleName(); 36 } 37 38 } 39