Here you can find the source of isHttpUrl(final URL url)
public static boolean isHttpUrl(final URL url)
//package com.java2s; //License from project: Open Source License import java.net.URL; public class Main { public static boolean isHttpUrl(final URL url) { final String protocol = url.getProtocol(); return "http".equalsIgnoreCase(protocol) || "https".equalsIgnoreCase(protocol); }// w w w.j a va 2 s .co m }