code: public static StreamDecoder createInstance (URL url)
          throws IOException
      {
          String path = url.getPath();
          int idx = path.lastIndexOf('.');
          if (idx == -1) {
              log.warning("Missing extension for URL.", "url", url);
              return null;
          }
          String extension = path.substring(idx+1);
          Class<? extends StreamDecoder> clazz = _extensions.get(extension);
          if (clazz == null) {
              log.warning("No decoder registered for extension.",
                  "extension", extension, "url", url);
              return null;
          }
          StreamDecoder decoder;
          try {
              decoder = clazz.newInstance();
          } catch (Exception e) {
              log.warning("Error instantiating decoder.", "url", url, e);
              return null;
          }
          decoder.init(url.openStream());
          return decoder;
      }
docs: Creates and initializes a stream decoder for the specified URL.