docs: public static File toFile(URL pURL) {
          if (pURL == null) {
              throw new NullPointerException("URL == null");
          }
  
          // NOTE: Precondition tests below is based on the File(URI) constructor,
          //   and is most likely overkill...
          // NOTE: A URI is absolute iff it has a scheme component
          //   As the scheme has to be "file", this is implicitly tested below
          // NOTE: A URI is opaque iff it is absolute and it's shceme-specific
          //   part does not begin with a '/', see below
          if (!"file".equals(pURL.getProtocol())) {
              // URL protocol => URI scheme
              throw new IllegalArgumentException("URL scheme is not \"file\"");
          }
          if (pURL.getAuthority() != null) {
              throw new IllegalArgumentException("URL has an authority component");
          }
          if (pURL.getRef() != null) {
              // URL ref (anchor) => URI fragment
              throw new IllegalArgumentException("URI has a fragment component");
          }
          if (pURL.getQuery() != null) {
              throw new IllegalArgumentException("URL has a query component");
          }
          String path = pURL.getPath();
          if (!path.startsWith("/")) {
              // A URL should never be able to represent an opaque URI, test anyway
              throw new IllegalArgumentException("URI is not hierarchical");
          }
          if (path.equals("")) {
              throw new IllegalArgumentException("URI path component is empty");
          }
  
          // Convert separator, doesn't seem to be neccessary on Windows/Unix,
          // but do it anyway to be compatible...
          if (File.separatorChar != '/') {
              path = path.replace('/', File.separatorChar);
          }
  
          return resolve(path);
      }