Package com.ctc.wstx.evt
Class WstxEventReader
- java.lang.Object
-
- org.codehaus.stax2.ri.Stax2EventReaderImpl
-
- com.ctc.wstx.evt.WstxEventReader
-
- All Implemented Interfaces:
Iterator<Object>,XMLEventReader,XMLStreamConstants,XMLEventReader2
public class WstxEventReader extends Stax2EventReaderImpl
Woodstox version, based on generic Stax reference implementation baseline ofStax2EventReaderImpl.
-
-
Field Summary
-
Fields inherited from class org.codehaus.stax2.ri.Stax2EventReaderImpl
ERR_GETELEMTEXT_NON_TEXT_EVENT, ERR_GETELEMTEXT_NOT_START_ELEM, ERR_NEXTTAG_NON_WS_TEXT, ERR_NEXTTAG_WRONG_TYPE, mAllocator, mPrePeekEvent, mReader, mState, STATE_CONTENT, STATE_END_OF_INPUT, STATE_INITIAL
-
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description WstxEventReader(XMLEventAllocator a, XMLStreamReader2 r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetErrorDesc(int errorType, int currEvent)Method called upon encountering a problem that should result in an exception being thrown.booleanisPropertySupported(String name)Method similar toXMLInputFactory.isPropertySupported(java.lang.String), used to determine whether a property is supported by the Reader instance.protected voidreportProblem(String msg, Location loc)booleansetProperty(String name, Object value)Method that can be used to set per-reader properties; a subset of properties one can set via matchingXMLInputFactory2instance.-
Methods inherited from class org.codehaus.stax2.ri.Stax2EventReaderImpl
close, createNextEvent, createStartDocumentEvent, getElementText, getProperty, getStreamReader, hasNext, hasNextEvent, next, nextEvent, nextTag, peek, remove, reportProblem, throwUnchecked
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
WstxEventReader
public WstxEventReader(XMLEventAllocator a, XMLStreamReader2 r)
-
-
Method Detail
-
getErrorDesc
protected String getErrorDesc(int errorType, int currEvent)
Description copied from class:Stax2EventReaderImplMethod called upon encountering a problem that should result in an exception being thrown. If non-null String is returned. that will be used as the message of exception thrown; if null, a standard message will be used instead.- Specified by:
getErrorDescin classStax2EventReaderImpl- Parameters:
errorType- Type of the problem, one ofERR_constantscurrEvent- Type of the event that triggered the problem, if any; -1 if not available.
-
isPropertySupported
public boolean isPropertySupported(String name)
Description copied from interface:XMLEventReader2Method similar toXMLInputFactory.isPropertySupported(java.lang.String), used to determine whether a property is supported by the Reader instance. This means that this method may return false for some properties that the input factory does support: specifically, it should only return true if the value is mutable on per-instance basis. False means that either the property is not recognized, or is not mutable via reader instance.- Specified by:
isPropertySupportedin interfaceXMLEventReader2- Specified by:
isPropertySupportedin classStax2EventReaderImpl
-
setProperty
public boolean setProperty(String name, Object value)
Description copied from interface:XMLEventReader2Method that can be used to set per-reader properties; a subset of properties one can set via matchingXMLInputFactory2instance. Exactly which methods are mutable is implementation specific.- Specified by:
setPropertyin interfaceXMLEventReader2- Specified by:
setPropertyin classStax2EventReaderImpl- Parameters:
name- Name of the property to setvalue- Value to set property to.- Returns:
- True, if the specified property was succesfully set to specified value; false if its value was not changed
-
reportProblem
protected void reportProblem(String msg, Location loc) throws XMLStreamException
- Overrides:
reportProblemin classStax2EventReaderImpl- Throws:
XMLStreamException
-
-