Class WrappingXMLInputFactory
- java.lang.Object
-
- javax.xml.stream.XMLInputFactory
-
- org.apache.axiom.util.stax.wrapper.XMLInputFactoryWrapper
-
- org.apache.axiom.util.stax.wrapper.WrappingXMLInputFactory
-
- Direct Known Subclasses:
UnclosedReaderDetector
public class WrappingXMLInputFactory extends XMLInputFactoryWrapper
XMLInputFactory
wrapper that wraps allXMLEventReader
andXMLStreamReader
instances created from it.
-
-
Field Summary
-
Fields inherited from class javax.xml.stream.XMLInputFactory
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD
-
-
Constructor Summary
Constructors Constructor Description WrappingXMLInputFactory(XMLInputFactory parent)
Constructor.
-
Method Summary
-
Methods inherited from class org.apache.axiom.util.stax.wrapper.XMLInputFactoryWrapper
getEventAllocator, getProperty, getXMLReporter, getXMLResolver, isPropertySupported, setEventAllocator, setProperty, setXMLReporter, setXMLResolver
-
Methods inherited from class javax.xml.stream.XMLInputFactory
newDefaultFactory, newFactory, newFactory, newInstance, newInstance
-
-
-
-
Constructor Detail
-
WrappingXMLInputFactory
public WrappingXMLInputFactory(XMLInputFactory parent)
Constructor.- Parameters:
parent
- the parent factory
-
-
Method Detail
-
wrap
protected XMLEventReader wrap(XMLEventReader reader)
Wrap a reader created from this factory. Implementations should override this method if they which to wrapXMLEventReader
instances created from the factory. The default implementation simply returns the unwrapped reader.- Parameters:
reader
- the reader to wrap- Returns:
- the wrapped reader
-
wrap
protected XMLStreamReader wrap(XMLStreamReader reader)
Wrap a reader created from this factory. Implementations should override this method if they which to wrapXMLStreamReader
instances created from the factory. The default implementation simply returns the unwrapped reader.- Parameters:
reader
- the reader to wrap- Returns:
- the wrapped reader
-
createFilteredReader
public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException
- Overrides:
createFilteredReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createFilteredReader
public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException
- Overrides:
createFilteredReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(InputStream stream, String encoding) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(InputStream stream) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(Reader reader) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(Source source) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, InputStream stream) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, Reader reader) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
- Overrides:
createXMLEventReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(InputStream stream, String encoding) throws XMLStreamException
- Overrides:
createXMLStreamReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(InputStream stream) throws XMLStreamException
- Overrides:
createXMLStreamReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
- Overrides:
createXMLStreamReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException
- Overrides:
createXMLStreamReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, InputStream stream) throws XMLStreamException
- Overrides:
createXMLStreamReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, Reader reader) throws XMLStreamException
- Overrides:
createXMLStreamReader
in classXMLInputFactoryWrapper
- Throws:
XMLStreamException
-
-