Class UnixResolverDnsServerAddressStreamProvider

    • Constructor Detail

      • UnixResolverDnsServerAddressStreamProvider

        public UnixResolverDnsServerAddressStreamProvider​(File etcResolvConf,
                                                          File... etcResolverFiles)
                                                   throws IOException
        Parse a file of the format /etc/resolv.conf which may contain the default DNS server to use, and also overrides for individual domains. Also parse list of files of the format /etc/resolver which may contain multiple files to override the name servers used for multiple domains.
        Parameters:
        etcResolvConf - /etc/resolv.conf.
        etcResolverFiles - List of files of the format defined in /etc/resolver.
        Throws:
        IOException - If an error occurs while parsing the input files.
      • UnixResolverDnsServerAddressStreamProvider

        public UnixResolverDnsServerAddressStreamProvider​(String etcResolvConf,
                                                          String etcResolverDir)
                                                   throws IOException
        Parse a file of the format /etc/resolv.conf which may contain the default DNS server to use, and also overrides for individual domains. Also parse a directory of the format /etc/resolver which may contain multiple files to override the name servers used for multiple domains.
        Parameters:
        etcResolvConf - /etc/resolv.conf.
        etcResolverDir - Directory containing files of the format defined in /etc/resolver.
        Throws:
        IOException - If an error occurs while parsing the input files.