Here you can find the source of stringToUri(String fileString)
public static URI stringToUri(String fileString)
//package com.java2s; import java.io.File; import java.net.URI; public class Main { public static URI stringToUri(String fileString) { return new File(fileString).toURI(); }/*ww w . jav a2 s.co m*/ }