org.apache.axiom.util.stax.wrapper

## Class WrappingXMLOutputFactory

- java.lang.Object
- - javax.xml.stream.XMLOutputFactory
  - - org.apache.axiom.util.stax.wrapper.XMLOutputFactoryWrapper
    - - org.apache.axiom.util.stax.wrapper.WrappingXMLOutputFactory

-     public class WrappingXMLOutputFactory
      extends XMLOutputFactoryWrapper

  `XMLOutputFactory` wrapper that wraps all `XMLEventWriter` and `XMLStreamWriter` instances created from it.

- - ### Field Summary

    - ### Fields inherited from class javax.xml.stream.XMLOutputFactory

      `IS_REPAIRING_NAMESPACES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WrappingXMLOutputFactory(javax.xml.stream.XMLOutputFactory parent)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.xml.stream.XMLEventWriter` | `createXMLEventWriter(OutputStream stream)`
    `javax.xml.stream.XMLEventWriter` | `createXMLEventWriter(OutputStream stream, String encoding)`
    `javax.xml.stream.XMLEventWriter` | `createXMLEventWriter(Result result)`
    `javax.xml.stream.XMLEventWriter` | `createXMLEventWriter(Writer stream)`
    `javax.xml.stream.XMLStreamWriter` | `createXMLStreamWriter(OutputStream stream)`
    `javax.xml.stream.XMLStreamWriter` | `createXMLStreamWriter(OutputStream stream, String encoding)`
    `javax.xml.stream.XMLStreamWriter` | `createXMLStreamWriter(Result result)`
    `javax.xml.stream.XMLStreamWriter` | `createXMLStreamWriter(Writer stream)`
    `protected javax.xml.stream.XMLEventWriter` | `wrap(javax.xml.stream.XMLEventWriter writer)` Wrap a writer created from this factory.
    `protected javax.xml.stream.XMLStreamWriter` | `wrap(javax.xml.stream.XMLStreamWriter writer)` Wrap a writer created from this factory.

    - ### Methods inherited from class org.apache.axiom.util.stax.wrapper.XMLOutputFactoryWrapper

      `getProperty, isPropertySupported, setProperty`

    - ### Methods inherited from class javax.xml.stream.XMLOutputFactory

      `newFactory, newFactory, newInstance, newInstance`

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

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

- - ### Constructor Detail

    - #### WrappingXMLOutputFactory

          public WrappingXMLOutputFactory(javax.xml.stream.XMLOutputFactory parent)

      Constructor.
      Parameters:
        `parent` - the parent factory

  - ### Method Detail

    - #### wrap

          protected javax.xml.stream.XMLEventWriter wrap(javax.xml.stream.XMLEventWriter writer)

      Wrap a writer created from this factory. Implementations should override this method if they wish to wrap `XMLEventWriter` instances created from the factory. The default implementation simply returns the unwrapped writer.
      Parameters:
        `writer` - the writer to wrap
      Returns:
        the wrapped writer

    - #### wrap

          protected javax.xml.stream.XMLStreamWriter wrap(javax.xml.stream.XMLStreamWriter writer)

      Wrap a writer created from this factory. Implementations should override this method if they wish to wrap `XMLStreamWriter` instances created from the factory. The default implementation simply returns the unwrapped writer.
      Parameters:
        `writer` - the writer to wrap
      Returns:
        the wrapped writer

    - #### createXMLEventWriter

          public javax.xml.stream.XMLEventWriter createXMLEventWriter(OutputStream stream,
                                                                      String encoding)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventWriter

          public javax.xml.stream.XMLEventWriter createXMLEventWriter(OutputStream stream)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventWriter

          public javax.xml.stream.XMLEventWriter createXMLEventWriter(Result result)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLEventWriter

          public javax.xml.stream.XMLEventWriter createXMLEventWriter(Writer stream)
                                                               throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLEventWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamWriter

          public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(OutputStream stream,
                                                                        String encoding)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamWriter

          public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(OutputStream stream)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamWriter

          public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(Result result)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### createXMLStreamWriter

          public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(Writer stream)
                                                                 throws javax.xml.stream.XMLStreamException

      Overrides:
        `createXMLStreamWriter` in class `XMLOutputFactoryWrapper`
      Throws:
        `javax.xml.stream.XMLStreamException`

Copyright © The Apache Software Foundation. All Rights Reserved.