Here you can find the source of hasHttp(String url)
public static boolean hasHttp(String url)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean hasHttp(String url) { return url.startsWith("http://") || url.startsWith("https://"); }/* w w w . jav a 2s.c om*/ }