public class SystemDefaultDnsResolver extends java.lang.Object implements DnsResolver
| Modifier and Type | Field and Description |
|---|---|
static SystemDefaultDnsResolver |
INSTANCE |
| Constructor and Description |
|---|
SystemDefaultDnsResolver() |
| Modifier and Type | Method and Description |
|---|---|
java.net.InetAddress[] |
resolve(java.lang.String host)
Returns the IP address for the specified host name, or null if the given
host is not recognized or the associated IP address cannot be used to
build an InetAddress instance.
|
java.lang.String |
resolveCanonicalHostname(java.lang.String host)
Gets the fully qualified domain name for given host name.
|
public static final SystemDefaultDnsResolver INSTANCE
public java.net.InetAddress[] resolve(java.lang.String host)
throws java.net.UnknownHostException
DnsResolverresolve in interface DnsResolverhost - The host name to be resolved by this resolver.java.net.UnknownHostExceptionInetAddresspublic java.lang.String resolveCanonicalHostname(java.lang.String host)
throws java.net.UnknownHostException
DnsResolverresolveCanonicalHostname in interface DnsResolverjava.net.UnknownHostException