Package com.microstrategy.utils.xml
Class FileFinderEntityResolver
- java.lang.Object
-
- com.microstrategy.utils.xml.FileFinderEntityResolver
-
- All Implemented Interfaces:
org.xml.sax.EntityResolver
- Direct Known Subclasses:
FileLoaderEntityResolver
public class FileFinderEntityResolver extends java.lang.Object implements org.xml.sax.EntityResolver
This EntityResolver tries to create the InputStream using theFileFinder
, which basically looks for files in the class-path.- Since:
- MicroStrategy Web 9.0.0
-
-
Constructor Summary
Constructors Constructor Description FileFinderEntityResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getFileName(java.lang.String publicId, java.lang.String systemId)
Resolves the file name from the systemId.protected java.io.InputStream
getInputStream(java.lang.String fileName)
Returns the InputStream for the given fileName.org.xml.sax.InputSource
resolveEntity(java.lang.String publicId, java.lang.String systemId)
-
-
-
Method Detail
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
resolveEntity
in interfaceorg.xml.sax.EntityResolver
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
getFileName
protected java.lang.String getFileName(java.lang.String publicId, java.lang.String systemId)
Resolves the file name from the systemId. This implementation just returns the file starting from the last slash (/). For example, ifsystemId
is:
it returns:"/path/name.dtd"
name.dtd
-
getInputStream
protected java.io.InputStream getInputStream(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException
Returns the InputStream for the given fileName.- Throws:
java.io.FileNotFoundException
java.io.IOException
- See Also:
FileFinder.getResourceAsStream(java.lang.String)
-
-