Class StreamEntityResolver

java.lang.Object
at.gv.egovernment.moaspss.util.StreamEntityResolver
All Implemented Interfaces:
EntityResolver

public class StreamEntityResolver extends Object implements EntityResolver
An EntityResolver that maps system IDs to InputStreams.
  • Constructor Details

    • StreamEntityResolver

      public StreamEntityResolver(Map mappedEntities)
      Create a StreamEntityResolver.
      Parameters:
      mappedEntities - A mapping from public or system IDs (String objects) to InputStreams.
  • Method Details

    • resolveEntity

      public InputSource resolveEntity(String publicId, String systemId) throws 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 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:
      SAXException - Signalling a parsing exception.
      IOException - Error reading the entity.