Here you can find the source of uri(String uri)
public static URI uri(String uri)
//package com.java2s; //License from project: Open Source License import java.net.URI; public class Main { public static URI uri(String uri) { try {/*from w w w . j av a2s .c om*/ return new URI(uri); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } } }