public InputSource resolveEntity ( String publicId , String systemId ) throws SAXException , IOException { URL resourceURL = resources . get ( publicId ) ; if ( resourceURL != null ) { InputStream resourceStream = resourceURL . openStream ( ) ; InputSource is = new InputSource ( resourceStream ) ; is . setPublicId ( publicId ) ; is . setSystemId ( resourceURL . toExternalForm ( ) ) ; return is ; } return null ; }
Creates an InputSource with a SystemID corresponding to a local dtd file .