Here you can find the source of getUri(String uriName)
public static URI getUri(String uriName)
//package com.java2s; // under the terms of the GNU General Public License. For other license import java.net.URI; public class Main { public static URI getUri(String uriName) { try {// w w w .java 2 s . c o m return new URI(uriName); } catch (Exception e) { throw new RuntimeException(e); } } }