Example #1
0
 public static URL toURL(String str) {
   try {
     if (!Path.uriSchemeSpecified(str)) {
       Path cur = currentPath();
       Path path = cur.resolve(str);
       if (path.isAbsolute()) return path.toURL();
       str = path.toString();
     }
     return new URL(str);
   } catch (Throwable ex) {
     throw WrappedException.wrapIfNeeded(ex);
   }
 }
Example #2
0
 public Path resolve(Path relative) {
   if (relative.isAbsolute()) return relative;
   return resolve(relative.toString());
 }