|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.conn.util.PublicSuffixMatcher
@Contract(threading=SAFE) public final class PublicSuffixMatcher
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
PublicSuffixList| Constructor Summary | |
|---|---|
PublicSuffixMatcher(Collection<PublicSuffixList> lists)
|
|
PublicSuffixMatcher(Collection<String> rules,
Collection<String> exceptions)
|
|
PublicSuffixMatcher(DomainType domainType,
Collection<String> rules,
Collection<String> exceptions)
|
|
| Method Summary | |
|---|---|
String |
getDomainRoot(String domain)
Returns registrable part of the domain for the given domain name or null
if given domain represents a public suffix. |
String |
getDomainRoot(String domain,
DomainType expectedType)
Returns registrable part of the domain for the given domain name or null
if given domain represents a public suffix. |
boolean |
matches(String domain)
Tests whether the given domain matches any of entry from the public suffix list. |
boolean |
matches(String domain,
DomainType expectedType)
Tests whether the given domain matches any of entry from the public suffix list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PublicSuffixMatcher(Collection<String> rules,
Collection<String> exceptions)
public PublicSuffixMatcher(DomainType domainType,
Collection<String> rules,
Collection<String> exceptions)
public PublicSuffixMatcher(Collection<PublicSuffixList> lists)
| Method Detail |
|---|
public String getDomainRoot(String domain)
null
if given domain represents a public suffix.
domain -
public String getDomainRoot(String domain,
DomainType expectedType)
null
if given domain represents a public suffix.
domain - expectedType - expected domain type or null if any.
public boolean matches(String domain)
public boolean matches(String domain,
DomainType expectedType)
domain - expectedType - expected domain type or null if any.
true if the given domain matches any of the public suffixes.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||