Class Stax2EventReaderAdapter

  • All Implemented Interfaces:
    Iterator, XMLEventReader, XMLEventReader2

    public class Stax2EventReaderAdapter
    extends Object
    implements XMLEventReader2
    This adapter implements parts of XMLEventReader2, the extended stream reader defined by Stax2 extension, by wrapping a vanilla Stax 1.0 XMLEventReader implementation.

    Note: the implementation may be incomplete as-is, since not all features needed are necessarily 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
    Author:
    Tatu Saloranta