public class SystemDefaultDnsResolver extends Object implements DnsResolver
| Modifier and Type | Field and Description |
|---|---|
static SystemDefaultDnsResolver |
INSTANCE |
| Constructor and Description |
|---|
SystemDefaultDnsResolver() |
| Modifier and Type | Method and Description |
|---|---|
InetAddress[] |
resolve(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.
|
String |
resolveCanonicalHostname(String host)
Gets the fully qualified domain name for given host name.
|
public static final SystemDefaultDnsResolver INSTANCE
public InetAddress[] resolve(String host) throws UnknownHostException
DnsResolverresolve in interface DnsResolverhost - The host name to be resolved by this resolver.UnknownHostExceptionInetAddresspublic String resolveCanonicalHostname(String host) throws UnknownHostException
DnsResolverresolveCanonicalHostname in interface DnsResolverUnknownHostExceptionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.