List of utility methods to do URI Normalize
URI | normalizeURI(String uri) Normalizes a URI as specified in section 6.2.2 of RFC 3986 return normalizeURI(new URI(uri)); |
String | normalizeURIPath(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) { ... |
String | normalizeUriPath(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); |