I am looking for a java library/class to parse clean URL’s and get all the properties like query, port, host , domain, subdomain etc. Essentially most of the functionality that java.net.URI does but even for clean URLs. I am guessing since this is a pretty common requirement, there might be some libraries already built to handle this. Help?
Share
java.net.URLclass has methodsgetHost(),getPort(),getQuery(),getPath().You can also look at
URIclass, it’s more preferred to use it.