Class DNSAddressRR
- java.lang.Object
- 
- org.opennms.netmgt.provision.support.dns.DNSAddressRR
 
- 
 public final class DNSAddressRR extends java.lang.ObjectHolds a DNS resource record which is a DNS response that gives the IP address of a particular hostname. A resource record typically has: Element Description Name Domain name that the resource record describes. Type Type of RR. Class RR Class. TTL Time-To-Live for the RR. RDLEN Length of the following data. Data Actual data of this RR. - Author:
- Sowmya
 
- 
- 
Constructor SummaryConstructors Constructor Description DNSAddressRR(java.lang.String name, int type, int clas, long ttl, DNSInputStream dnsIn)Constructs an new DNS Address Resource Record with the specified information.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getAddress()Returns the address from the address record as a byte array.java.net.InetAddressgetInetAddress()the InetAddress of the address contained for the record.intgetRRClass()Returns the class of this RR.java.lang.StringgetRRName()Returns the name of this RR.longgetRRTTL()Returns the TTL of this RR.intgetRRType()Returns the type of this RR.booleanisValid()Returns true if still valid i.e.java.lang.StringtoString()Converts the object to a textual string that describes the resource record.
 
- 
- 
- 
Constructor Detail- 
DNSAddressRRpublic DNSAddressRR(java.lang.String name, int type, int clas, long ttl, DNSInputStream dnsIn) throws java.io.IOExceptionConstructs an new DNS Address Resource Record with the specified information. - Parameters:
- name- name of the RR
- type- type of the RR
- clas- class of the RR
- ttl- time for which this RR is valid
- dnsIn- inputstream for this RR
- Throws:
- java.io.IOException- Thrown if an error occurs decoding data from the passed DNSInputStream.
- java.io.IOException- if any.
 
 
- 
 - 
Method Detail- 
getAddresspublic byte[] getAddress() Returns the address from the address record as a byte array. - Returns:
- The address as a byte array.
 
 - 
getInetAddresspublic java.net.InetAddress getInetAddress() throws java.net.UnknownHostExceptionthe InetAddress of the address contained for the record. - Returns:
- The InetAddress of the address
- Throws:
- java.net.UnknownHostException- Thrown if the InetAddress object cannot be constructed.
- java.net.UnknownHostException- if any.
 
 - 
toStringpublic java.lang.String toString() Converts the object to a textual string that describes the resource record. - Overrides:
- toStringin class- java.lang.Object
- Returns:
- The string describing the object.
 
 - 
getRRNamepublic java.lang.String getRRName() Returns the name of this RR. - Returns:
- The name of this RR.
 
 - 
getRRTypepublic int getRRType() Returns the type of this RR. - Returns:
- The type of this RR.
 
 - 
getRRClasspublic int getRRClass() Returns the class of this RR. - Returns:
- The class of this RR.
 
 - 
getRRTTLpublic long getRRTTL() Returns the TTL of this RR. - Returns:
- the TTL of this RR
 
 - 
isValidpublic boolean isValid() Returns true if still valid i.e. TTL has not expired. - Returns:
- True if valid, false if not.
 
 
- 
 
-