Class Stax2WriterAdapter

java.lang.Object
org.codehaus.stax2.util.StreamWriterDelegate
org.codehaus.stax2.ri.Stax2WriterAdapter
All Implemented Interfaces:
XMLStreamConstants, XMLStreamWriter, TypedXMLStreamWriter, Validatable, XMLStreamWriter2

public class Stax2WriterAdapter extends StreamWriterDelegate implements XMLStreamWriter2, XMLStreamConstants
This adapter implements parts of XMLStreamWriter2, the extended stream writer defined by Stax2 extension, by wrapping a vanilla Stax 1.0 XMLStreamReader implementation.

Note: the implementation is incomplete as-is, since not all features needed are accessible via basic Stax 1.0 interface. As such, two main use cases for this wrapper are:

  • Serve as convenient base class for a complete implementation, which can use native accessors provided by the wrapped Stax implementation
  • To be used for tasks that make limited use of Stax2 API, such that missing parts are not needed