Class DefaultDnsServerAddressStreamProvider

    • Method Detail

      • defaultAddressList

        public static List<InetSocketAddress> defaultAddressList()
        Returns the list of the system DNS server addresses. If it failed to retrieve the list of the system DNS server addresses from the environment, it will return "8.8.8.8" and "8.8.4.4", the addresses of the Google public DNS servers.
      • defaultAddresses

        public static DnsServerAddresses defaultAddresses()
        Returns the DnsServerAddresses that yields the system DNS server addresses sequentially. If it failed to retrieve the list of the system DNS server addresses from the environment, it will use "8.8.8.8" and "8.8.4.4", the addresses of the Google public DNS servers.

        This method has the same effect with the following code:

         DnsServerAddresses.sequential(DnsServerAddresses.defaultAddressList());