Class SMInputContext


  • public final class SMInputContext
    extends java.lang.Object
    Class that encapsulates details about context in which StaxMate input is done. The most important of the details is the stream reader to use (since that is eventually invoked to do the real output), and its properties.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.xml.stream.util.XMLEventAllocator _allocator  
      (package private) org.codehaus.stax2.XMLStreamReader2 _streamReader  
    • Constructor Summary

      Constructors 
      Constructor Description
      SMInputContext​(org.codehaus.stax2.XMLStreamReader2 sr)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.stream.events.XMLEvent currentAsEvent()  
      int getDepth()  
      javax.xml.stream.Location getEventLocation()
      Method for accessing starting location of the currently pointed-to event, within input stream.
      javax.xml.stream.Location getStreamLocation()
      Method for accessing the currently pointed-to location within input stream.
      protected org.codehaus.stax2.XMLStreamReader2 getStreamReader()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _streamReader

        final org.codehaus.stax2.XMLStreamReader2 _streamReader
      • _allocator

        protected javax.xml.stream.util.XMLEventAllocator _allocator
    • Constructor Detail

      • SMInputContext

        public SMInputContext​(org.codehaus.stax2.XMLStreamReader2 sr)
    • Method Detail

      • currentAsEvent

        public javax.xml.stream.events.XMLEvent currentAsEvent()
                                                        throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • getStreamReader

        protected org.codehaus.stax2.XMLStreamReader2 getStreamReader()
      • getDepth

        public int getDepth()
      • getEventLocation

        public javax.xml.stream.Location getEventLocation()
        Method for accessing starting location of the currently pointed-to event, within input stream.
      • getStreamLocation

        public javax.xml.stream.Location getStreamLocation()
        Method for accessing the currently pointed-to location within input stream. May be useful for indicating error location, for example.