Given this :
URL u=new URL("someURL");
How do i identify the top level domain of the URL..
Guava provides a nice utility for this. It works as follow:
InternetDomainName.from("someurl.co.uk").publicSuffix()
will get you co.uk
InternetDomainName.from("someurl.de").publicSuffix()
will get you de