Here you can find the source of validateUri(String uri)
public static String validateUri(String uri) throws java.net.MalformedURLException
//package com.java2s; //License from project: Open Source License import java.net.URL; public class Main { public static String validateUri(String uri) throws java.net.MalformedURLException { final URL url; try {/*from w ww . ja v a 2 s.c om*/ url = new URL(uri); } catch (Exception e1) { return ("'" + uri + "' is not a valid URL: " + e1 .getLocalizedMessage()); } if (!"http".equals(url.getProtocol())) { return ("'" + uri + "' is not a valid URL: Model name must use http protocol."); } return null; } }