Java Utililty Methods URI Normalize

List of utility methods to do URI Normalize

Description

The list of methods to do URI Normalize are organized into topic(s).

Method

URInormalizeURI(String uri)
Normalizes a URI as specified in section 6.2.2 of RFC 3986
return normalizeURI(new URI(uri));
StringnormalizeURIPath(String uri)
normalize URI Path
if (uri.indexOf('%') < 0 && !uri.startsWith("./") && !uri.startsWith("../") && !uri.endsWith("/.")
        && !uri.endsWith("/..") && uri.indexOf("/../") < 0 && uri.indexOf("/./") < 0
        && uri.indexOf("//") < 0) {
    return uri;
try {
    uri = new URI(uri).normalize().getPath();
} catch (URISyntaxException e) {
...
StringnormalizeUriPath(String uriPath)
Calculate the normalized form of the given uriPath.
if (uriPath.endsWith("/"))
    return uriPath;
int idx = uriPath.lastIndexOf('/');
return uriPath.substring(0, idx + 1);