Class XOPDecodingStreamReader

java.lang.Object
org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper
org.apache.axiom.util.stax.xop.XOPDecodingStreamReader
All Implemented Interfaces:
XMLStreamConstants, XMLStreamReader, DataHandlerReader

public class XOPDecodingStreamReader extends XMLStreamReaderWrapper implements DataHandlerReader
XMLStreamReader wrapper that decodes XOP. It uses the extension defined by DataHandlerReader to expose the DataHandler objects referenced by xop:Include elements encountered in the underlying stream. If the consumer uses getText(), getTextCharacters(), getTextCharacters(int, char[], int, int) or getElementText() when an xop:Include element is present in the underlying stream, then the decoder will produce a base64 representation of the data.

Note that this class only implements infoset transformation, but doesn't handle MIME processing. A MimePartProvider implementation must be provided to the constructor of this class. This object will be used to load MIME parts referenced by xop:Include elements encountered in the underlying stream.

This class supports deferred loading of MIME parts: If the consumer uses DataHandlerReader.getDataHandlerProvider(), then the MimePartProvider will only be invoked when DataHandlerProvider.getDataHandler() is called.