code: private String joinUrl(String url, String... paths) {
  		StringBuilder result = new StringBuilder(url);
  		for (String path : paths) {
  			if (path != null) {
  				String p = path.replaceFirst("^(\\/)+", "");
  				if (result.lastIndexOf("/") != result.length() - 1) {
  					result.append('/');
  				}
  				result.append(p);
  			}
  		}
  		return result.toString();
  	}
docs: join a base url to another path or paths - this will handle trailing or non-trailing /'s