Package com.bea.xml.stream.events
Class CharactersEvent
java.lang.Object
com.bea.xml.stream.events.BaseEvent
com.bea.xml.stream.events.CharactersEvent
- All Implemented Interfaces:
Characters
,XMLEvent
,Location
,XMLStreamConstants
- Direct Known Subclasses:
CommentEvent
-
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doWriteAsEncodedUnicode
(Writer writer) Template method to be implemented by sub-classes.getData()
Get the character data of this eventchar[]
boolean
hasData()
protected void
init()
boolean
isCData()
Returns true if this is a CData section.boolean
Return true if this is ignorableWhiteSpace.boolean
Returns true if this set of Characters is all whitespace.void
void
setIgnorable
(boolean ignorable) void
setSpace
(boolean space) Methods inherited from class com.bea.xml.stream.events.BaseEvent
asCharacters, asEndElement, asStartElement, getCharacterOffset, getColumnNumber, getEventType, getLineNumber, getLocation, getLocationURI, getPublicId, getSchemaType, getSourceName, getSystemId, getTypeAsString, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, recycle, setCharacterOffset, setColumnNumber, setEventType, setLineNumber, setLocationURI, toString, writeAsEncodedUnicode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
-
Constructor Details
-
CharactersEvent
public CharactersEvent() -
CharactersEvent
-
CharactersEvent
-
-
Method Details
-
setSpace
public void setSpace(boolean space) -
isWhiteSpace
public boolean isWhiteSpace()Description copied from interface:javax.xml.stream.events.Characters
Returns true if this set of Characters is all whitespace. Whitespace inside a document is reported as CHARACTERS. This method allows checking of CHARACTERS events to see if they are composed of only whitespace characters- Specified by:
isWhiteSpace
in interfaceCharacters
-
isIgnorableWhiteSpace
public boolean isIgnorableWhiteSpace()Description copied from interface:javax.xml.stream.events.Characters
Return true if this is ignorableWhiteSpace. If this event is ignorableWhiteSpace its event type will be SPACE.- Specified by:
isIgnorableWhiteSpace
in interfaceCharacters
-
setIgnorable
public void setIgnorable(boolean ignorable) -
init
protected void init() -
getData
Description copied from interface:javax.xml.stream.events.Characters
Get the character data of this event- Specified by:
getData
in interfaceCharacters
-
setData
-
hasData
public boolean hasData() -
isCData
public boolean isCData()Description copied from interface:javax.xml.stream.events.Characters
Returns true if this is a CData section. If this event is CData its event type will be CDATA If javax.xml.stream.isCoalescing is set to true CDATA Sections that are surrounded by non CDATA characters will be reported as a single Characters event. This method will return false in this case.- Specified by:
isCData
in interfaceCharacters
-
getDataAsArray
public char[] getDataAsArray() -
doWriteAsEncodedUnicode
Description copied from class:BaseEvent
Template method to be implemented by sub-classes.- Specified by:
doWriteAsEncodedUnicode
in classBaseEvent
- Throws:
IOException
-