Here you can find the source of preUrl(String url)
public static String preUrl(String url)
//package com.java2s; //License from project: Apache License public class Main { public static String preUrl(String url) { if (url == null) { return null; }/* w w w. j av a 2 s . co m*/ if (url.startsWith("http://") || url.startsWith("https://")) { return url; } else { return "http://" + url; } } }