Package org.apache.http.conn.util
Class PublicSuffixMatcher
java.lang.Object
org.apache.http.conn.util.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
-
Constructor Summary
Constructors Constructor Description PublicSuffixMatcher(Collection<String> rules, Collection<String> exceptions)
-
Method Summary
Modifier and Type Method Description String
getDomainRoot(String domain)
Returns registrable part of the domain for the given domain name ofnull
if given domain represents a public suffix.boolean
matches(String domain)
-
Constructor Details
-
Method Details
-
getDomainRoot
Returns registrable part of the domain for the given domain name ofnull
if given domain represents a public suffix.- Parameters:
domain
-- Returns:
- domain root
-
matches
-