org.apache.tomcat.util.descriptor

## 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 and 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

    Methods
    Modifier and Type | Method and 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 resources
        `systemIds` - mapping of well-known system identifiers to local resources
        `blockExternal` - 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 interface `org.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 interface `org.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 interface `org.xml.sax.ext.EntityResolver2`
      Throws:
        `org.xml.sax.SAXException`
        `java.io.IOException`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.