org.springframework.batch.item.xml.stax
Class DefaultFragmentEventReader
java.lang.Object
org.springframework.batch.item.xml.stax.DefaultFragmentEventReader
- All Implemented Interfaces:
- Iterator, XMLEventReader, FragmentEventReader
public class DefaultFragmentEventReader
- extends Object
- implements FragmentEventReader
Default implementation of FragmentEventReader
- Author:
- Robert Kasanicky
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wrappedEventReader
protected XMLEventReader wrappedEventReader
DefaultFragmentEventReader
public DefaultFragmentEventReader(XMLEventReader wrappedEventReader)
- Caches the StartDocument event for later use.
- Parameters:
wrappedEventReader
- the original wrapped event reader
markStartFragment
public void markStartFragment()
- Description copied from interface:
FragmentEventReader
- Tells the event reader its cursor position is exactly before the fragment.
- Specified by:
markStartFragment
in interface FragmentEventReader
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
- Specified by:
hasNext
in interface XMLEventReader
next
public Object next()
- Specified by:
next
in interface Iterator
nextEvent
public XMLEvent nextEvent()
throws XMLStreamException
- Specified by:
nextEvent
in interface XMLEventReader
- Throws:
XMLStreamException
peek
public XMLEvent peek()
throws XMLStreamException
- Specified by:
peek
in interface XMLEventReader
- Throws:
XMLStreamException
markFragmentProcessed
public void markFragmentProcessed()
- Finishes reading the fragment in case the fragment was processed without
being read until the end.
- Specified by:
markFragmentProcessed
in interface FragmentEventReader
reset
public void reset()
- Description copied from interface:
FragmentEventReader
- Reset the state of the fragment reader - make it forget
it assumptions about current position of cursor
(e.g. in case of rollback of the wrapped reader).
- Specified by:
reset
in interface FragmentEventReader
close
public void close()
throws XMLStreamException
- Specified by:
close
in interface XMLEventReader
- Throws:
XMLStreamException
getElementText
public String getElementText()
throws XMLStreamException
- Specified by:
getElementText
in interface XMLEventReader
- Throws:
XMLStreamException
getProperty
public Object getProperty(String name)
throws IllegalArgumentException
- Specified by:
getProperty
in interface XMLEventReader
- Throws:
IllegalArgumentException
nextTag
public XMLEvent nextTag()
throws XMLStreamException
- Specified by:
nextTag
in interface XMLEventReader
- Throws:
XMLStreamException
remove
public void remove()
- Specified by:
remove
in interface Iterator
Copyright © 2013 SpringSource. All Rights Reserved.