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 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 voiddoWriteAsEncodedUnicode(Writer writer) Template method to be implemented by sub-classes.getData()Get the character data of this eventchar[]booleanhasData()protected voidinit()booleanisCData()Returns true if this is a CData section.booleanReturn true if this is ignorableWhiteSpace.booleanReturns true if this set of Characters is all whitespace.voidvoidsetIgnorable(boolean ignorable) voidsetSpace(boolean space) Methods inherited from class 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, writeAsEncodedUnicodeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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.CharactersReturns 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:
isWhiteSpacein interfaceCharacters
-
isIgnorableWhiteSpace
public boolean isIgnorableWhiteSpace()Description copied from interface:javax.xml.stream.events.CharactersReturn true if this is ignorableWhiteSpace. If this event is ignorableWhiteSpace its event type will be SPACE.- Specified by:
isIgnorableWhiteSpacein interfaceCharacters
-
setIgnorable
public void setIgnorable(boolean ignorable) -
init
protected void init() -
getData
Description copied from interface:javax.xml.stream.events.CharactersGet the character data of this event- Specified by:
getDatain interfaceCharacters
-
setData
-
hasData
public boolean hasData() -
isCData
public boolean isCData()Description copied from interface:javax.xml.stream.events.CharactersReturns 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:
isCDatain interfaceCharacters
-
getDataAsArray
public char[] getDataAsArray() -
doWriteAsEncodedUnicode
Description copied from class:BaseEventTemplate method to be implemented by sub-classes.- Specified by:
doWriteAsEncodedUnicodein classBaseEvent- Throws:
IOException
-