Here you can find the source of isURL(String token)
@SuppressWarnings("unused") public static boolean isURL(String token)
//package com.java2s; import java.net.MalformedURLException; import java.net.URL; public class Main { /**// w w w. j a va2 s .c o m * Returns true if the input token is a URL, and false otherwise. */ @SuppressWarnings("unused") public static boolean isURL(String token) { try { URL url = new URL(token); return true; } catch (MalformedURLException e) { return false; } } }