i need to retrieve an top level domain from the url means ex
http://www.google.com
this can be attained by
url.getHost();
but the thing is in case i have some sub domain with url
it extracts example.google.com
i need to extract the google.com
alone is there is any way to extract it...