at.gv.egovernment.moa.util
Class StreamEntityResolver
java.lang.Object
|
+--at.gv.egovernment.moa.util.StreamEntityResolver
- All Implemented Interfaces:
- org.xml.sax.EntityResolver
- public class StreamEntityResolver
- extends Object
- implements org.xml.sax.EntityResolver
An EntityResolver
that maps system IDs to
InputStream
s.
- Version:
- $Id$
- Author:
- Patrick Peck
Method Summary |
org.xml.sax.InputSource |
resolveEntity(String publicId,
String systemId)
Resolve an entity by looking it up in the mapped entities.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamEntityResolver
public StreamEntityResolver(Map mappedEntities)
- Create a
StreamEntityResolver
.
- Parameters:
mappedEntities
- A mapping from public or system IDs
(String
objects) to InputStream
s.
resolveEntity
public org.xml.sax.InputSource resolveEntity(String publicId,
String systemId)
throws org.xml.sax.SAXException,
IOException
- Resolve an entity by looking it up in the mapped entities.
First, the public ID is looked up in the mapping, then the system ID.
- Specified by:
resolveEntity
in interface org.xml.sax.EntityResolver
- Parameters:
publicId
- The public ID of the entity.systemId
- The system ID of the entity.- Returns:
- An
InputStream
containing the entity or
null
if no entity could be found. - Throws:
org.xml.sax.SAXException
- Signalling a parsing exception.IOException
- Error reading the entity.