docs: public static InputStream
      getInputStreamFromURLOrClasspathOrFileSystem(String textFileOrUrl)
      throws IOException
    {
      InputStream in;
      if (textFileOrUrl.matches("https?://.*")) {
        URL u = new URL(textFileOrUrl);
        URLConnection uc = u.openConnection();
        in = uc.getInputStream();
      } else {
        try {
          in = findStreamInClasspathOrFileSystem(textFileOrUrl);
        } catch (FileNotFoundException e) {
          try {
            // Maybe this happens to be some other format of URL?
            URL u = new URL(textFileOrUrl);
            URLConnection uc = u.openConnection();
            in = uc.getInputStream();
          } catch (IOException e2) {
            // TODO: freaking Java 1.5 didn't have an IOException that
            // could take a throwable as a cause
            throw new IOException("Unable to resolve \"" +
                                  textFileOrUrl + "\" as either " +
                                  "class path, filename or URL");
          }
        }
      }
  
      // buffer this stream
      in = new BufferedInputStream(in);
  
      // gzip it if necessary
      if(textFileOrUrl.endsWith(".gz"))
        in = new GZIPInputStream(in);
  
      return in;
    }