-
public final class PublicSuffixDatabaseA database of public suffixes provided by publicsuffix.org.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringPUBLIC_SUFFIX_RESOURCE
-
Method Summary
Modifier and Type Method Description static PublicSuffixDatabaseget()StringgetEffectiveTldPlusOne(String domain)Returns the effective top-level domain plus one (eTLD+1) by referencing the public suffix list.Returns null if the domain is a public suffix. -
-
Method Detail
-
get
static PublicSuffixDatabase get()
-
getEffectiveTldPlusOne
String getEffectiveTldPlusOne(String domain)
Returns the effective top-level domain plus one (eTLD+1) by referencing the public suffix list.Returns null if the domain is a public suffix.
Here are some examples:
{@code * assertEquals("google.com", getEffectiveTldPlusOne("google.com")); * assertEquals("google.com", getEffectiveTldPlusOne("www.google.com")); * assertNull(getEffectiveTldPlusOne("com")); * }- Parameters:
domain- A canonicalized domain.
-
-
-
-