Here you can find the source of isHttpUrl(String input)
public static boolean isHttpUrl(String input)
//package com.java2s; public class Main { public static boolean isHttpUrl(String input) { if (!isNullOrEmpty(input)) { String regexExpression = "http://([\\w\\WW-]+\\.)+[\\w\\W-]+(/[\\w\\W- ./?%&=]*)?"; if (input.matches(regexExpression)) { return true; }/*from ww w. ja v a 2 s . c om*/ } return false; } public static boolean isNullOrEmpty(String input) { if (null == input || "".equals(input)) { return true; } return false; } }