public class DefaultFragmentEventReader extends java.lang.Object implements FragmentEventReader
FragmentEventReader
Modifier and Type | Field and Description |
---|---|
protected javax.xml.stream.XMLEventReader |
wrappedEventReader |
Constructor and Description |
---|
DefaultFragmentEventReader(javax.xml.stream.XMLEventReader wrappedEventReader)
Caches the StartDocument event for later use.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.String |
getElementText() |
java.lang.Object |
getProperty(java.lang.String name) |
boolean |
hasNext() |
void |
markFragmentProcessed()
Finishes reading the fragment in case the fragment was processed without
being read until the end.
|
void |
markStartFragment()
Tells the event reader its cursor position is exactly before the fragment.
|
java.lang.Object |
next() |
javax.xml.stream.events.XMLEvent |
nextEvent() |
javax.xml.stream.events.XMLEvent |
nextTag() |
javax.xml.stream.events.XMLEvent |
peek() |
void |
remove() |
void |
reset()
Reset the state of the fragment reader - make it forget
it assumptions about current position of cursor
(e.g.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DefaultFragmentEventReader(javax.xml.stream.XMLEventReader wrappedEventReader)
wrappedEventReader
- the original wrapped event readerpublic void markStartFragment()
FragmentEventReader
markStartFragment
in interface FragmentEventReader
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in interface javax.xml.stream.XMLEventReader
public java.lang.Object next()
next
in interface java.util.Iterator
public javax.xml.stream.events.XMLEvent nextEvent() throws javax.xml.stream.XMLStreamException
nextEvent
in interface javax.xml.stream.XMLEventReader
javax.xml.stream.XMLStreamException
public javax.xml.stream.events.XMLEvent peek() throws javax.xml.stream.XMLStreamException
peek
in interface javax.xml.stream.XMLEventReader
javax.xml.stream.XMLStreamException
public void markFragmentProcessed()
markFragmentProcessed
in interface FragmentEventReader
public void reset()
FragmentEventReader
reset
in interface FragmentEventReader
public void close() throws javax.xml.stream.XMLStreamException
close
in interface javax.xml.stream.XMLEventReader
javax.xml.stream.XMLStreamException
public java.lang.String getElementText() throws javax.xml.stream.XMLStreamException
getElementText
in interface javax.xml.stream.XMLEventReader
javax.xml.stream.XMLStreamException
public java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException
getProperty
in interface javax.xml.stream.XMLEventReader
java.lang.IllegalArgumentException
public javax.xml.stream.events.XMLEvent nextTag() throws javax.xml.stream.XMLStreamException
nextTag
in interface javax.xml.stream.XMLEventReader
javax.xml.stream.XMLStreamException
public void remove()
remove
in interface java.util.Iterator