@Immutable public final class PublicSuffixList extends Object
PublicSuffixListFactory
for building this api.
You can use the API's methods with UTF-8 domain names or Punycode
encoded ASCII domain names. The API will return the results in
the same format as the input was. I.e. if you use an UTF-8 string
the result will be an UTF-8 String as well. Same for Punycode.
The API is case insensitive.PublicSuffixListFactory
,
https://publicsuffix.org/,
DonationsModifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Returns the character encoding of the public suffix list.
|
String |
getPublicSuffix(String domain)
Returns the public suffix from a domain.
|
String |
getRegistrableDomain(String domain)
Gets the registrable domain.
|
List<Rule> |
getRules()
Returns a list with all rules.
|
URL |
getURL()
Returns the URL of the public suffix list.
|
boolean |
isPublicSuffix(String domain)
Returns whether a domain is a public suffix or not.
|
boolean |
isRegistrable(String domain)
Returns whether a domain is registrable.
|
public String getRegistrableDomain(String domain)
domain
- the domain name, null returns nullpublic boolean isRegistrable(String domain)
domain
- the domain name, not nulltrue
if the domain is registrablepublic String getPublicSuffix(String domain)
domain
- the domain namenull
if none matchedpublic boolean isPublicSuffix(String domain)
domain
- the domain name, not nulltrue
if the domain is a public suffixpublic Charset getCharset()
public URL getURL()
Copyright © 2016. All rights reserved.