Class LocalResolver
- java.lang.Object
-
- org.apache.tomcat.util.descriptor.LocalResolver
-
- All Implemented Interfaces:
org.xml.sax.EntityResolver
,org.xml.sax.ext.EntityResolver2
public class LocalResolver extends java.lang.Object implements org.xml.sax.ext.EntityResolver2
A resolver for locally cached XML resources.
-
-
Constructor Summary
Constructors Constructor Description LocalResolver(java.util.Map<java.lang.String,java.lang.String> publicIds, java.util.Map<java.lang.String,java.lang.String> systemIds, boolean blockExternal)
Constructor providing mappings of public and system identifiers to local resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.InputSource
getExternalSubset(java.lang.String name, java.lang.String baseURI)
org.xml.sax.InputSource
resolveEntity(java.lang.String publicId, java.lang.String systemId)
org.xml.sax.InputSource
resolveEntity(java.lang.String name, java.lang.String publicId, java.lang.String base, java.lang.String systemId)
-
-
-
Constructor Detail
-
LocalResolver
public LocalResolver(java.util.Map<java.lang.String,java.lang.String> publicIds, java.util.Map<java.lang.String,java.lang.String> systemIds, boolean blockExternal)
Constructor providing mappings of public and system identifiers to local resources. Each map contains a mapping from a well-known identifier to a URL for a local resource path.- Parameters:
publicIds
- mapping of well-known public identifiers to local resourcessystemIds
- mapping of well-known system identifiers to local resourcesblockExternal
- are external resources blocked that are not well-known
-
-
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
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String name, java.lang.String publicId, java.lang.String base, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
resolveEntity
in interfaceorg.xml.sax.ext.EntityResolver2
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
getExternalSubset
public org.xml.sax.InputSource getExternalSubset(java.lang.String name, java.lang.String baseURI) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
getExternalSubset
in interfaceorg.xml.sax.ext.EntityResolver2
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
-