code: @Override
      public InputStream getInputStream() throws IOException {
          synchronized (delegates) {
              String key = getURL().toExternalForm();
              if (delegates.containsKey(key)) {
                  Delegate d = delegates.get(key);
                  if (d != null) {
                      return d.delegateURL.openStream();
                  }
                  //means somehow we got a null in our map for the given key,
                  //unexpected, and means the code is broken somehow. 
                  throw new IOException(new IllegalStateException("" + getURL()));
              }
          }
          //we don't have a url to map to for this invocation. 
          //can happen if the url is accessed after the source providing
          //bundle is uninstalled.
          throw new FileNotFoundException("" + getURL());
      }
docs: {@inheritDoc}