public class PublicSuffixList extends Object implements Iterable<Rule>
PublicSuffixListFactory for building this api.
You can use the API's methods with UTF-8 domain names or Punnycode
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 Punnycode.PublicSuffixListFactory| Modifier | Constructor and Description |
|---|---|
protected |
PublicSuffixList(Index index,
URL url,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
Charset |
getCharset()
Returns the charset of the public suffix list
|
String |
getPublicSuffix(String domain)
Returns the public suffix from a domain or null.
|
String |
getRegistrableDomain(String domain)
Gets the registrable domain or null.
|
List<Rule> |
getRules()
Returns a list with all rules
|
URL |
getURL()
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.
|
Iterator<Rule> |
iterator() |
protected PublicSuffixList(Index index, URL url, Charset charset)
PublicSuffixListFactory.build()public String getRegistrableDomain(String domain)
public boolean isRegistrable(String domain)
NullPointerException - if domain is null.public String getPublicSuffix(String domain)
public boolean isPublicSuffix(String domain)
NullPointerException - is domain is null.public Charset getCharset()
public URL getURL()
Copyright © 2014. All Rights Reserved.