org.apache.xerces.util

## Class EntityResolverWrapper

- java.lang.Object
- - org.apache.xerces.util.EntityResolverWrapper

All Implemented Interfaces:
  org.apache.xerces.xni.parser.XMLEntityResolver

    public class EntityResolverWrapper
    extends java.lang.Object
    implements org.apache.xerces.xni.parser.XMLEntityResolver

This class wraps a SAX entity resolver in an XNI entity resolver.

Version:
  $Id: EntityResolverWrapper.java 699892 2008-09-28 21:08:27Z mrglavas $
Author:
  Andy Clark, IBM
See Also:
  `EntityResolver`

### Field Summary

Fields
`protected org.xml.sax.EntityResolver` `fEntityResolver` The SAX entity resolver.

### Constructor Summary

Constructors
Constructor and Description
`EntityResolverWrapper()` Default constructor.
`EntityResolverWrapper(org.xml.sax.EntityResolver entityResolver)` Wraps the specified SAX entity resolver.

### Method Summary

All Methods Instance Methods Concrete Methods
`org.xml.sax.EntityResolver` `getEntityResolver()` Returns the SAX entity resolver.
`org.apache.xerces.xni.parser.XMLInputSource` `resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)` Resolves an external parsed entity.
`void` `setEntityResolver(org.xml.sax.EntityResolver entityResolver)` Sets the SAX entity resolver.

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

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

### Field Detail

#### fEntityResolver

    protected org.xml.sax.EntityResolver fEntityResolver

The SAX entity resolver.

### Constructor Detail

#### EntityResolverWrapper

    public EntityResolverWrapper()

Default constructor.

#### EntityResolverWrapper

    public EntityResolverWrapper(org.xml.sax.EntityResolver entityResolver)

Wraps the specified SAX entity resolver.

### Method Detail

#### setEntityResolver

    public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)

Sets the SAX entity resolver.

#### getEntityResolver

    public org.xml.sax.EntityResolver getEntityResolver()

Returns the SAX entity resolver.

#### resolveEntity

    public org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)
                                                              throws org.apache.xerces.xni.XNIException,
                                                                     java.io.IOException

Resolves an external parsed entity. If the entity cannot be resolved, this method should return null.

Specified by:
  `resolveEntity` in interface `org.apache.xerces.xni.parser.XMLEntityResolver`
Parameters:
  `resourceIdentifier` - contains the physical co-ordinates of the resource to be resolved
Throws:
  `org.apache.xerces.xni.XNIException` - Thrown on general error.
  `java.io.IOException` - Thrown if resolved entity stream cannot be opened or some other i/o error occurs.
See Also:
  `XMLResourceIdentifier`