URI result = parseIntoURI(uri);
URI result = createURI(uri);
  public static URI createFileURI(String pathName)  {    File file = new File(pathName);    String uri = File.separatorChar != '/' ? pathName.replace(File.separatorChar, SEGMENT_SEPARATOR) : pathName;    if (uri.indexOf(' ') != -1)    {      uri = uri.replaceAll(" ", "%20");    }    if (file.isAbsolute())    {      URI result = parseIntoURI((uri.charAt(0) == SEGMENT_SEPARATOR ? "file:" : "file:/") + uri);      return result;    }    else    {      URI result = parseIntoURI(uri);      if (result.scheme() != null)      {        throw new IllegalArgumentException("invalid relative pathName: " + pathName);      }      return result;    }  }