Class DefaultHostsFileEntriesResolver

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.InetAddress address​(java.lang.String inetHost, ResolvedAddressTypes resolvedAddressTypes)
      Resolve the address of a hostname against the entries in a hosts file, depending on some address types.
      java.util.List<java.net.InetAddress> addresses​(java.lang.String inetHost, ResolvedAddressTypes resolvedAddressTypes)
      Resolves all addresses of a hostname against the entries in a hosts file, depending on the specified ResolvedAddressTypes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultHostsFileEntriesResolver

        public DefaultHostsFileEntriesResolver()
    • Method Detail

      • address

        public java.net.InetAddress address​(java.lang.String inetHost,
                                            ResolvedAddressTypes resolvedAddressTypes)
        Description copied from interface: HostsFileEntriesResolver
        Resolve the address of a hostname against the entries in a hosts file, depending on some address types.
        Specified by:
        address in interface HostsFileEntriesResolver
        Parameters:
        inetHost - the hostname to resolve
        resolvedAddressTypes - the address types to resolve
        Returns:
        the first matching address
      • addresses

        public java.util.List<java.net.InetAddress> addresses​(java.lang.String inetHost,
                                                              ResolvedAddressTypes resolvedAddressTypes)
        Resolves all addresses of a hostname against the entries in a hosts file, depending on the specified ResolvedAddressTypes.
        Parameters:
        inetHost - the hostname to resolve
        resolvedAddressTypes - the address types to resolve
        Returns:
        all matching addresses or null in case the hostname cannot be resolved