org.apache.axiom.util.stax.wrapper

## 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 all `XMLEventReader` and `XMLStreamReader` 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 and Description
    `WrappingXMLInputFactory(javax.xml.stream.XMLInputFactory parent)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.xml.stream.XMLEventReader` | `createFilteredReader(javax.xml.stream.XMLEventReader reader, javax.xml.stream.EventFilter filter)`
    `javax.xml.stream.XMLStreamReader` | `createFilteredReader(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.StreamFilter filter)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(InputStream stream)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(InputStream stream, String encoding)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(Reader reader)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(Source source)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(String systemId, InputStream stream)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(String systemId, Reader reader)`
    `javax.xml.stream.XMLEventReader` | `createXMLEventReader(javax.xml.stream.XMLStreamReader reader)`
    `javax.xml.stream.XMLStreamReader` | `createXMLStreamReader(InputStream stream)`
    `javax.xml.stream.XMLStreamReader` | `createXMLStreamReader(InputStream stream, String encoding)`
    `javax.xml.stream.XMLStreamReader` | `createXMLStreamReader(Reader reader)`
    `javax.xml.stream.XMLStreamReader` | `createXMLStreamReader(Source source)`
    `javax.xml.stream.XMLStreamReader` | `createXMLStreamReader(String systemId, InputStream stream)`
    `javax.xml.stream.XMLStreamReader` | `createXMLStreamReader(String systemId, Reader reader)`
    `protected javax.xml.stream.XMLEventReader` | `wrap(javax.xml.stream.XMLEventReader reader)` Wrap a reader created from this factory.
    `protected javax.xml.stream.XMLStreamReader` | `wrap(javax.xml.stream.XMLStreamReader reader)` Wrap a reader created from this factory.

    - ### 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

      `newFactory, newFactory, newInstance, newInstance`

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

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

- - ### Constructor Detail

    - #### WrappingXMLInputFactory

          public WrappingXMLInputFactory(javax.xml.stream.XMLInputFactory parent)

      Constructor.
      Parameters:
        `parent` - the parent factory

  - ### Method Detail

    - #### wrap

          protected javax.xml.stream.XMLEventReader wrap(javax.xml.stream.XMLEventReader reader)

      Wrap a reader created from this factory. Implementations should override this method if they which to wrap `XMLEventReader` 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 javax.xml.stream.XMLStreamReader wrap(javax.xml.stream.XMLStreamReader reader)

      Wrap a reader created from this factory. Implementations should override this method if they which to wrap `XMLStreamReader` 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 javax.xml.stream.XMLEventReader createFilteredReader(javax.xml.stream.XMLEventReader reader,
                                                                      javax.xml.stream.EventFilter filter)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createFilteredReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createFilteredReader

          public javax.xml.stream.XMLStreamReader createFilteredReader(javax.xml.stream.XMLStreamReader reader,
                                                                       javax.xml.stream.StreamFilter filter)
                                                                throws javax.xml.stream.XMLStreamException

      Overrides:
        `createFilteredReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(InputStream stream,
                                                                      String encoding)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(InputStream stream)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(Reader reader)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(Source source)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(String systemId,
                                                                      InputStream stream)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(String systemId,
                                                                      Reader reader)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventReader

          public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.stream.XMLStreamReader reader)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamReader

          public javax.xml.stream.XMLStreamReader createXMLStreamReader(InputStream stream,
                                                                        String encoding)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamReader

          public javax.xml.stream.XMLStreamReader createXMLStreamReader(InputStream stream)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamReader

          public javax.xml.stream.XMLStreamReader createXMLStreamReader(Reader reader)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamReader

          public javax.xml.stream.XMLStreamReader createXMLStreamReader(Source source)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamReader

          public javax.xml.stream.XMLStreamReader createXMLStreamReader(String systemId,
                                                                        InputStream stream)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamReader

          public javax.xml.stream.XMLStreamReader createXMLStreamReader(String systemId,
                                                                        Reader reader)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamReader` in class `XMLInputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

Copyright © The Apache Software Foundation. All Rights Reserved.