org.xbill.DNS
Class ReverseMap

java.lang.Object
  extended byorg.xbill.DNS.ReverseMap

public final class ReverseMap
extends Object

A set functions designed to deal with DNS names used in reverse mappings. For an IP address a.b.c.d, the reverse map name is d.c.b.a.in-addr.arpa.

Author:
Brian Wellington

Method Summary
static Name fromAddress(InetAddress addr)
          Creates a reverse map name corresponding to an address contained in an InetAddress.
static Name fromAddress(int[] addr)
          Creates a reverse map name corresponding to an address contained in an array of 4 integers.
static Name fromAddress(String addr)
          Creates a reverse map name corresponding to an address contained in a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromAddress

public static Name fromAddress(int[] addr)
Creates a reverse map name corresponding to an address contained in an array of 4 integers.

Parameters:
addr - The address from which to build a name.
Returns:
The name corresponding to the address in the reverse map.

fromAddress

public static Name fromAddress(InetAddress addr)
Creates a reverse map name corresponding to an address contained in an InetAddress.

Parameters:
addr - The address from which to build a name.
Returns:
The name corresponding to the address in the reverse map.

fromAddress

public static Name fromAddress(String addr)
                        throws UnknownHostException
Creates a reverse map name corresponding to an address contained in a String.

Parameters:
addr - The address from which to build a name.
Returns:
The name corresponding to the address in the reverse map.
Throws:
UnknownHostException - The string does not contain a valid address.