code: private static String filepath2URI(String path) {
      // return null if path is null.
      if (path == null) {
        return null;
      }
      path = escapeSpecialAsciiAndNonAscii(path);
      return path;
    }
docs: To escape a file path to a URI, by using %HH to represent
  special ASCII characters: 0x00~0x1F, 0x7F, ' ', '<', '>', '#', '%'
  and '"' and non-ASCII characters (whose value >= 128).
  
  '\' character will also be escaped.
  
  @param path The path to be escaped.
  @return The escaped uri.