public final class UnixResolverDnsServerAddressStreamProvider extends java.lang.Object implements DnsServerAddressStreamProvider
构造器和说明 |
---|
UnixResolverDnsServerAddressStreamProvider(java.io.File etcResolvConf,
java.io.File... etcResolverFiles)
Parse a file of the format /etc/resolv.conf which may contain
the default DNS server to use, and also overrides for individual domains.
|
UnixResolverDnsServerAddressStreamProvider(java.lang.String etcResolvConf,
java.lang.String etcResolverDir)
Parse a file of the format /etc/resolv.conf which may contain
the default DNS server to use, and also overrides for individual domains.
|
限定符和类型 | 方法和说明 |
---|---|
DnsServerAddressStream |
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query for
hostname . |
public UnixResolverDnsServerAddressStreamProvider(java.io.File etcResolvConf, java.io.File... etcResolverFiles) throws java.io.IOException
etcResolvConf
- /etc/resolv.conf.etcResolverFiles
- List of files of the format defined in
/etc/resolver.java.io.IOException
- If an error occurs while parsing the input files.public UnixResolverDnsServerAddressStreamProvider(java.lang.String etcResolvConf, java.lang.String etcResolverDir) throws java.io.IOException
etcResolvConf
- /etc/resolv.conf.etcResolverDir
- Directory containing files of the format defined in
/etc/resolver.java.io.IOException
- If an error occurs while parsing the input files.public DnsServerAddressStream nameServerAddressStream(java.lang.String hostname)
DnsServerAddressStreamProvider
hostname
.nameServerAddressStream
在接口中 DnsServerAddressStreamProvider
hostname
- The hostname for which to lookup the DNS server addressed to use.
If this is the final DnsServerAddressStreamProvider
to be queried then generally empty
string or '.'
correspond to the default DnsServerAddressStream
.DnsServerAddressStream
which should be used to resolve hostname
.