Here you can find the source of validateUri(String uri)
public static void validateUri(String uri)
//package com.java2s; //License from project: Apache License import java.net.URI; public class Main { public static void validateUri(String uri) { try {/*from ww w .java 2 s . c o m*/ new URI(uri); } catch (Exception e) { throw new Error(e); } } }