public class SystemDefaultDnsResolver extends Object implements DnsResolver
| 限定符和类型 | 字段和说明 |
|---|---|
static SystemDefaultDnsResolver |
INSTANCE |
| 构造器和说明 |
|---|
SystemDefaultDnsResolver() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 DnsResolverhost - The host name to be resolved by this resolver.UnknownHostExceptionInetAddresspublic String resolveCanonicalHostname(String host) throws UnknownHostException
DnsResolverresolveCanonicalHostname 在接口中 DnsResolverUnknownHostExceptionCopyright © 2023. All rights reserved.