Class DefaultHostsFileEntriesResolver

    • Constructor Detail

      • DefaultHostsFileEntriesResolver

        public DefaultHostsFileEntriesResolver()
    • Method Detail

      • address

        public InetAddress address​(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 List<InetAddress> addresses​(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