public final class PublicSuffixMatcher extends Object
An up-to-date list of suffixes can be obtained from publicsuffix.org
PublicSuffixList| Constructor and Description |
|---|
PublicSuffixMatcher(Collection<String> rules,
Collection<String> exceptions)
Create public suffix matcher.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDomainRoot(String domain)
Returns registrable part of the domain for the given domain name of
null
if given domain represents a public suffix. |
boolean |
matches(String domain) |
public PublicSuffixMatcher(Collection<String> rules, Collection<String> exceptions)
rules - domain suffix rulesexceptions - domain suffix exceptionspublic String getDomainRoot(String domain)
null
if given domain represents a public suffix.domain - the domain name to checkpublic boolean matches(String domain)