Here you can find the source of isHttpUrl(String in)
public static boolean isHttpUrl(String in)
//package com.java2s; //License from project: Apache License import java.net.MalformedURLException; import java.net.URL; public class Main { public static boolean isHttpUrl(String in) { try {//from w w w. j av a 2 s. c om URL url = new URL(in); return url.getProtocol().toLowerCase().startsWith("http"); } catch (MalformedURLException ignored) { } return false; } }