Skip to content

Instantly share code, notes, and snippets.

@theShadow89
Created November 15, 2013 10:54
Show Gist options
  • Save theShadow89/7482572 to your computer and use it in GitHub Desktop.
Save theShadow89/7482572 to your computer and use it in GitHub Desktop.
retrieve-an-top-level-domain-from-an-url-using-java
final InternetDomainName topPrivateDomain = InternetDomainName.from(uriHost).topPrivateDomain();
topPrivateDomain.name();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment