Top Description Constructors Methods
org.apache.http.conn.util

public final Class PublicSuffixListParser

extends Object
Class Inheritance
Annotations
@Contract
threading:IMMUTABLE
Imports
java.io.BufferedReader, .IOException, .Reader, java.util.ArrayList, .List, org.apache.http.annotation.Contract, .ThreadingBehavior

Parses the list from publicsuffix.org and configures a PublicSuffixFilter.
Since
4.4

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PublicSuffixList
parse(final Reader
the data reader. The caller is responsible for closing the reader.
reader
)

Parses the public suffix list format.

public List<PublicSuffixList>
parseByType(final Reader
the data reader. The caller is responsible for closing the reader.
reader
)

Parses the public suffix list format by domain type (currently supported ICANN and PRIVATE).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PublicSuffixListParserback to summary
public PublicSuffixListParser()

Method Detail

parseback to summary
public PublicSuffixList parse(final Reader reader) throws IOException

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:Reader

the data reader. The caller is responsible for closing the reader.

Exceptions
IOException:
on error while reading from list
parseByTypeback to summary
public List<PublicSuffixList> parseByType(final Reader reader) throws IOException

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:Reader

the data reader. The caller is responsible for closing the reader.

Exceptions
IOException:
on error while reading from list
Since
4.5