Here you can find the source of isUrl(String resourceLocation)
public static boolean isUrl(String resourceLocation)
//package com.java2s; //License from project: Apache License import java.net.MalformedURLException; import java.net.URL; public class Main { public static boolean isUrl(String resourceLocation) { if (resourceLocation == null) { return false; } else if (resourceLocation.startsWith("classpath:")) { return true; } else {/* w w w . j a v a2 s . co m*/ try { new URL(resourceLocation); return true; } catch (MalformedURLException var2) { return false; } } } }