List of utility methods to do URL Normalize
String | normalizeUrl(String url) Simple url normalization that adds http:// if no scheme exists, and strips empty paths, e.g., www.google.com/ -> http://www.google.com. String normalized; if (url != null) { int start; int schemePos = url.indexOf(SCHEME_SEPARATOR); if (schemePos == -1) { normalized = DEFAULT_SCHEME + SCHEME_SEPARATOR + url; start = DEFAULT_SCHEME.length() + SCHEME_SEPARATOR.length(); } else { ... |