Package 

Class PublicSuffixDatabase

    • Method Summary

      Modifier and Type Method Description
      static PublicSuffixDatabase get()
      String getEffectiveTldPlusOne(String domain) Returns the effective top-level domain plus one (eTLD+1) by referencing the public suffix list.Returns null if the domain is a public suffix.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getEffectiveTldPlusOne

         String getEffectiveTldPlusOne(String domain)

        Returns the effective top-level domain plus one (eTLD+1) by referencing the public suffix list.Returns null if the domain is a public suffix.

        Here are some examples:

        {@code * assertEquals("google.com", getEffectiveTldPlusOne("google.com")); * assertEquals("google.com", getEffectiveTldPlusOne("www.google.com")); * assertNull(getEffectiveTldPlusOne("com")); * }
        Parameters:
        domain - A canonicalized domain.