Package org.apache.http.impl.conn
Class SystemDefaultDnsResolver
- java.lang.Object
-
- org.apache.http.impl.conn.SystemDefaultDnsResolver
-
- All Implemented Interfaces:
DnsResolver
public class SystemDefaultDnsResolver extends java.lang.Object implements DnsResolver
DNS resolver that uses the default OS implementation for resolving host names.- Since:
- 4.2
-
-
Field Summary
Fields Modifier and Type Field Description static SystemDefaultDnsResolver
INSTANCE
-
Constructor Summary
Constructors Constructor Description SystemDefaultDnsResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
INSTANCE
public static final SystemDefaultDnsResolver INSTANCE
-
-
Method Detail
-
resolve
public java.net.InetAddress[] resolve(java.lang.String host) throws java.net.UnknownHostException
Description copied from interface:DnsResolver
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.- Specified by:
resolve
in interfaceDnsResolver
- Parameters:
host
- The host name to be resolved by this resolver.- Returns:
- The IP address associated to the given host name, or null if the host name is not known by the implementation class.
- Throws:
java.net.UnknownHostException
- See Also:
InetAddress
-
-