tuwien.auto.calimero.xml.def
Class DefaultEntityResolver

java.lang.Object
  extended by tuwien.auto.calimero.xml.def.DefaultEntityResolver
All Implemented Interfaces:
EntityResolver

public class DefaultEntityResolver
extends java.lang.Object
implements EntityResolver

Default entity resolver.


Constructor Summary
DefaultEntityResolver()
          Creates a new entity resolver.
 
Method Summary
 java.io.Reader getInputReader(java.io.InputStream is)
          Creates an Reader using the supplied input stream.
 java.io.InputStream resolveInput(java.lang.String systemID)
          Resolves the system identifier for a XML resource and wraps it into an input stream.
 java.io.OutputStream resolveOutput(java.lang.String systemID)
          Resolves the system identifier for a XML resource and wraps it into an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEntityResolver

public DefaultEntityResolver()
Creates a new entity resolver.

Method Detail

getInputReader

public java.io.Reader getInputReader(java.io.InputStream is)
                              throws KNXMLException
Description copied from interface: EntityResolver
Creates an Reader using the supplied input stream.

This method creates an appropriate reader based on the character encoding of the resource specified by the input stream and the XML declaration pseudo attribute, if available.
It should provide a default reader if a selection of the source encoding can't be done reliably.

Specified by:
getInputReader in interface EntityResolver
Parameters:
is - input stream to use as input for the reader to create
Returns:
the Reader for the input stream
Throws:
KNXMLException - on I/O error reading the input stream

resolveInput

public java.io.InputStream resolveInput(java.lang.String systemID)
                                 throws KNXMLException
Description copied from interface: EntityResolver
Resolves the system identifier for a XML resource and wraps it into an input stream.

Specified by:
resolveInput in interface EntityResolver
Parameters:
systemID - location identifier of the XML resource
Returns:
the input stream for the resource
Throws:
KNXMLException - if resolving failed

resolveOutput

public java.io.OutputStream resolveOutput(java.lang.String systemID)
                                   throws KNXMLException
Description copied from interface: EntityResolver
Resolves the system identifier for a XML resource and wraps it into an output stream.

Specified by:
resolveOutput in interface EntityResolver
Parameters:
systemID - location identifier of the XML resource
Returns:
the output stream for the resource
Throws:
KNXMLException - if resolving failed