code: public static String decodePath(String path) {
          URI tmp;
  
          try {
              tmp = new URI("scheme://host/" + path);
          } catch (URISyntaxException e) {
              throw new IllegalStateException(e);
          }
          return tmp.getPath().substring(1);
      }
docs: TODO: is there a better way ... ?