getReversedDomainParts
public static List<String> getReversedDomainParts(String host,
int numParts)
Given an url host, tokenizes the host parts by dot, reverses them, and pads (with "") or
truncates up to numParts pieces. Truncation happens post token reversal. This method properly
accounts for two-part top-level domains as listed at
http://www.surbl.org/two-level-tlds as of 05/12/2010. For example, www.twitter.co.uk will
be returned as ["co.uk", "twitter", "www"].
- Parameters:
host - A url host
numParts - The number of host parts to return.
- Returns:
- The reversed and tokenized list of host parts from host.