Class PublicSuffixListParser
java.lang.Object
nl.basjes.parse.useragent.utils.publicsuffixlist.PublicSuffixListParser
Parses the list from publicsuffix.org
and configures a PublicSuffixFilter.
- Since:
- 4.4
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionParses the public suffix list format.parseByType
(Reader reader) Parses the public suffix list format by domain type (currently supported ICANN and PRIVATE).
-
Field Details
-
INSTANCE
Singleton instance.- Since:
- 5.2
-
-
Constructor Details
-
PublicSuffixListParser
public PublicSuffixListParser()
-
-
Method Details
-
parse
Parses the public suffix list format.When creating the reader from the file, make sure to use the correct encoding (the original list is in UTF-8).
- Parameters:
reader
- the data reader. The caller is responsible for closing the reader.- Throws:
IOException
- on error while reading from list
-
parseByType
Parses the public suffix list format by domain type (currently supported ICANN and PRIVATE).When creating the reader from the file, make sure to use the correct encoding (the original list is in UTF-8).
- Parameters:
reader
- the data reader. The caller is responsible for closing the reader.- Throws:
IOException
- on error while reading from list- Since:
- 4.5
-