Class PaidLevelDomain


  • public class PaidLevelDomain
    extends Object
    Routines to extract the PLD (paid-level domain, as per the IRLbot paper) from a hostname or URL.
    • Constructor Detail

      • PaidLevelDomain

        public PaidLevelDomain()
    • Method Detail

      • getPLD

        public static String getPLD​(String hostname)
        Extract the PLD (paid-level domain) from the hostname. If the format isn't recognized, the original hostname is returned.
        Parameters:
        hostname - - hostname from URL, e.g. www.domain.com.it
        Returns:
        - PLD, e.g. domain.com.it
      • getPLD

        public static String getPLD​(URL url)
        Extract the PLD (paid-level domain) from the URL.
        Parameters:
        url - - Valid URL, e.g. http://www.domain.com.it
        Returns:
        - PLD e.g. domain.com.it