org.xbill.DNS.spi
public class DNSJavaNameService extends Object implements InvocationHandler
This Name Service Provider uses dnsjava.
To use this provider, you must set the following system property: sun.net.spi.nameservice.provider.1=dns,dnsjava
Modifier | Constructor and Description |
---|---|
protected |
DNSJavaNameService()
Creates a DNSJavaNameService instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getHostByAddr(byte[] addr)
Performs a reverse DNS lookup.
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
InetAddress[] |
lookupAllHostAddr(String host)
Performs a forward DNS lookup for the host name.
|
protected DNSJavaNameService()
Uses the sun.net.spi.nameservice.nameservers, sun.net.spi.nameservice.domain, and java.net.preferIPv6Addresses properties for configuration.
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public InetAddress[] lookupAllHostAddr(String host) throws UnknownHostException
host
- The host name to resolve.UnknownHostException
public String getHostByAddr(byte[] addr) throws UnknownHostException
addr
- The ip address to lookup.UnknownHostException