Here you can find the source of getURIFromPath(String path)
public static URI getURIFromPath(String path)
//package com.java2s; //License from project: Apache License import java.net.URI; import java.net.URISyntaxException; public class Main { public static URI getURIFromPath(String path) { URI retUri = null;//from w w w . j a va 2 s. c om try { retUri = new URI(path); } catch (URISyntaxException e) { e.printStackTrace(); } return retUri; } }