public final class PublicSuffixDatabase extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PUBLIC_SUFFIX_RESOURCE |
| Constructor and Description |
|---|
PublicSuffixDatabase() |
| Modifier and Type | Method and Description |
|---|---|
static PublicSuffixDatabase |
get() |
String |
getEffectiveTldPlusOne(String domain)
Returns the effective top-level domain plus one (eTLD+1) by referencing the public suffix list.
|
public static final String PUBLIC_SUFFIX_RESOURCE
public static PublicSuffixDatabase get()
public String getEffectiveTldPlusOne(String domain)
Here are some examples:
assertEquals("google.com", getEffectiveTldPlusOne("google.com"));
assertEquals("google.com", getEffectiveTldPlusOne("www.google.com"));
assertNull(getEffectiveTldPlusOne("com"));
domain - A canonicalized domain. An International Domain Name (IDN) should be punycode
encoded.Copyright © 2017. All Rights Reserved.