Class PublicSuffixListParser

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PublicSuffixList parse​(java.io.Reader reader)
      Parses the public suffix list format.
      java.util.List<PublicSuffixList> parseByType​(java.io.Reader reader)
      Parses the public suffix list format by domain type (currently supported ICANN and PRIVATE).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PublicSuffixListParser

        public PublicSuffixListParser()
    • Method Detail

      • parse

        public PublicSuffixList parse​(java.io.Reader reader)
                               throws java.io.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 - the data reader. The caller is responsible for closing the reader.
        Throws:
        java.io.IOException - on error while reading from list
      • parseByType

        public java.util.List<PublicSuffixList> parseByType​(java.io.Reader reader)
                                                     throws java.io.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 - the data reader. The caller is responsible for closing the reader.
        Throws:
        java.io.IOException - on error while reading from list
        Since:
        4.5