Here you can find the source of normalizeUrl(String url)
public static String normalizeUrl(String url)
//package com.java2s; public class Main { public static String normalizeUrl(String url) { if (url == null) return null; return url.replaceAll("([^:]/)/{2,}", "$1/"); }//from w w w. j a v a 2s . c o m }