code: public static InputSource newInputSource(Reader reader, String systemId) {
          InputSource source = new InputSource(reader);
          source.setSystemId(wrapSystemId(systemId));
          return source;
      }
docs: Create an InputSource from a Reader.
  
  The systemId will be wrapped for use with JSTL's EntityResolver and UriResolver.
  
  @param reader the source of the XML
  @param systemId the system id
  @return a configured InputSource