Here you can find the source of createFullURI(String val, Path parent)
private static URI createFullURI(String val, Path parent) throws URISyntaxException
//package com.java2s; //License from project: Apache License import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Path; public class Main { private static URI createFullURI(String val, Path parent) throws URISyntaxException { URI uri = URI.create(val.replace(" ", "%20")); if (uri.getScheme() == null) { uri = new URI("file", val, null); }/*w w w . j a va2 s .c om*/ if (uri.isOpaque()) { uri = new URI("file", parent.resolve(val).toAbsolutePath().toString(), null); } return uri; } }