Class PublicSuffixMatcher


  • public final class PublicSuffixMatcher
    extends Object
    Utility class that can test if DNS names match the content of the Public Suffix List.

    An up-to-date list of suffixes can be obtained from publicsuffix.org

    Since:
    4.4
    See Also:
    PublicSuffixList
    • Method Detail

      • getDomainRoot

        public String getDomainRoot​(String domain)
        Returns registrable part of the domain for the given domain name of null if given domain represents a public suffix.
        Parameters:
        domain -
        Returns:
        domain root
      • matches

        public boolean matches​(String domain)