code: public InputSource resolveEntity( String pName, String pPublicId, String pBaseURI, String pSystemId )
          throws SAXException, IOException
      {
          final InputSource source = resolver.resolveEntity( pPublicId, pSystemId );
          if ( source != null )
          {
              return source;
          }
          URI baseURI = null;
          if (pBaseURI!=null){
              try
              {
                  baseURI = new URI(pBaseURI);
              }
              catch ( URISyntaxException ex )
              {
                  throw new SAXException("Incorrectly formatted base URI", ex);
              }
          }
          URL url = resolve( pSystemId ,baseURI);
          if ( url != null )
          {
              return asInputSource( url );
          }
          return null;
      }
docs: Implementation of {@link EntityResolver2#resolveEntity(String, String, String, String)}