public class DNSJavaNameService
extends java.lang.Object
implements java.lang.reflect.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 |
|---|---|
java.lang.String |
getHostByAddr(byte[] addr)
Performs a reverse DNS lookup.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
java.net.InetAddress[] |
lookupAllHostAddr(java.lang.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 java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.Throwablepublic java.net.InetAddress[] lookupAllHostAddr(java.lang.String host)
throws java.net.UnknownHostException
host - The host name to resolve.java.net.UnknownHostExceptionpublic java.lang.String getHostByAddr(byte[] addr)
throws java.net.UnknownHostException
addr - The ip address to lookup.java.net.UnknownHostException