Java Utililty Methods URL Clear

List of utility methods to do URL Clear

Description

The list of methods to do URL Clear are organized into topic(s).

Method

StringcleanURL(final String input)
This method is used to remove extra characters from a URL.
String output = input.replace("\"", "");
output = output.replace(" ", "%22");
return output;
StringcleanUrl(String encodedUrl)
Clean an encoded string so it may be embedded as a query parameter.
return encodedUrl.replaceAll("\\+", "-").replaceAll("/", "_").replaceAll("=", "");
StringcleanUrl(String uriStr)
clean Url
if (isDevelopment()) {
    return uriStr.replace(getContextPath(), "");
return uriStr;
StringcleanUrl(String url)
clean Url
return url.replace("\"", "");
StringcleanUrl(String url)
clean Url
String cleanUrl = url.trim();
if (cleanUrl.length() >= 8) {
    if (cleanUrl.substring(0, 7).equalsIgnoreCase("http://")) {
        cleanUrl = "http://" + cleanUrl.substring(7);
    } else if (cleanUrl.substring(0, 8).equalsIgnoreCase("https://")) {
        cleanUrl = "https://" + cleanUrl.substring(8);
return cleanUrl;
StringcleanUrlTitle(String programTitle)
clean Url Title
return cleanUrlTitle(programTitle, DEFAULT_MIN_MUNGED_TITLE_LENGTH);