public class CustomEntityResolver extends Object implements EntityResolver
Modifier and Type | Class and Description |
---|---|
static class |
CustomEntityResolver.EntityKey
key for entity
consists of id + url
|
static interface |
CustomEntityResolver.EntityLocator
entity locator
manages locating an entity
|
static class |
CustomEntityResolver.ServletApiEntityLocator
entity locator for resources inside servlet-api.jar
|
Constructor and Description |
---|
CustomEntityResolver() |
Modifier and Type | Method and Description |
---|---|
static CustomEntityResolver |
getPreloaded()
get default instances of custom entity resolver with preloaded well-known entities
|
void |
put(CustomEntityResolver.EntityKey key,
CustomEntityResolver.EntityLocator locator)
add custom entity resolver
|
InputSource |
resolveEntity(String id,
String url) |
public static CustomEntityResolver getPreloaded()
public void put(CustomEntityResolver.EntityKey key, CustomEntityResolver.EntityLocator locator)
key
- key for lookup (contains id and url)locator
- locator for looking up entitypublic InputSource resolveEntity(String id, String url) throws SAXException, IOException
resolveEntity
in interface EntityResolver
SAXException
IOException
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.