Class UnixResolverDnsServerAddressStreamProvider

    • Constructor Detail

      • UnixResolverDnsServerAddressStreamProvider

        public UnixResolverDnsServerAddressStreamProvider​(java.io.File etcResolvConf,
                                                          java.io.File... etcResolverFiles)
                                                   throws java.io.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:
        java.io.IOException - If an error occurs while parsing the input files.
      • UnixResolverDnsServerAddressStreamProvider

        public UnixResolverDnsServerAddressStreamProvider​(java.lang.String etcResolvConf,
                                                          java.lang.String etcResolverDir)
                                                   throws java.io.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:
        java.io.IOException - If an error occurs while parsing the input files.