@Contract(threading=STATELESS) public final class PublicSuffixListParser extends Object
Modifier and Type | Field and Description |
---|---|
static PublicSuffixListParser |
INSTANCE
Singleton instance.
|
Constructor and Description |
---|
PublicSuffixListParser() |
Modifier and Type | Method and Description |
---|---|
PublicSuffixList |
parse(Reader reader)
Parses the public suffix list format.
|
List<PublicSuffixList> |
parseByType(Reader reader)
Parses the public suffix list format by domain type (currently supported ICANN and PRIVATE).
|
public static final PublicSuffixListParser INSTANCE
public PublicSuffixList parse(Reader reader) throws IOException
When creating the reader from the file, make sure to use the correct encoding (the original list is in UTF-8).
reader
- the data reader. The caller is responsible for closing the reader.IOException
- on error while reading from listpublic List<PublicSuffixList> parseByType(Reader reader) throws IOException
When creating the reader from the file, make sure to use the correct encoding (the original list is in UTF-8).
reader
- the data reader. The caller is responsible for closing the reader.IOException
- on error while reading from listCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.