org.springframework.batch.item.xml

## Class StaxUtils

- java.lang.Object
- - org.springframework.batch.item.xml.StaxUtils

-     public abstract class StaxUtils
      extends java.lang.Object

  This class provides a little bit of indirection to avoid ugly conditional object creation. It is unfortunately a bit redundant assuming a Spring 3.0 environment, but is necessary to work with Spring WS 1.5.x.
  The returned object determines whether the environment has Spring OXM as included in the Spring 3.x series of relies or whether it has Spring OXM from Spring WS 1.5x and factories a StaxSource instance appropriately.
  As the only class state maintained is to cache java reflection metadata, which is thread-safe, this class is thread-safe.
  Author:
    Josh Long

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaxUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.xml.transform.Result` | `getResult(javax.xml.stream.XMLEventWriter w)`
    `static javax.xml.transform.Source` | `getSource(javax.xml.stream.XMLEventReader r)`
    `static javax.xml.stream.XMLEventReader` | `getXmlEventReader(javax.xml.transform.Source s)`
    `static javax.xml.stream.XMLEventWriter` | `getXmlEventWriter(javax.xml.transform.Result r)`

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

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

- - ### Constructor Detail

    - #### StaxUtils

          public StaxUtils()

  - ### Method Detail

    - #### getSource

          public static javax.xml.transform.Source getSource(javax.xml.stream.XMLEventReader r)
                                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getResult

          public static javax.xml.transform.Result getResult(javax.xml.stream.XMLEventWriter w)
                                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getXmlEventWriter

          public static javax.xml.stream.XMLEventWriter getXmlEventWriter(javax.xml.transform.Result r)
                                                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getXmlEventReader

          public static javax.xml.stream.XMLEventReader getXmlEventReader(javax.xml.transform.Source s)
                                                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`