org.xbill.DNS
Class Address
java.lang.Object
|
+--org.xbill.DNS.Address
- public final class Address
- extends Object
A simple clone of the java.net.InetAddress class, using dnsjava routines.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Address
public Address()
getByName
public static InetAddress getByName(String name)
throws UnknownHostException
- Determines the IP address of a host
- Parameters:
name - The hostname to look up- Returns:
- The first matching IP address
- Throws:
- UnknownHostException - The hostname does not have any addresses
getAllByName
public static InetAddress[] getAllByName(String name)
throws UnknownHostException
- Determines all IP address of a host
- Parameters:
name - The hostname to look up- Returns:
- All matching IP addresses
- Throws:
- UnknownHostException - The hostname does not have any addresses
getHostName
public static String getHostName(InetAddress addr)
throws UnknownHostException
- Determines the hostname for an address
- Parameters:
addr - The address to look up- Returns:
- The associated host name
- Throws:
- UnknownHostException - There is no hostname for the address