Package org.codehaus.stax2.ri.evt
Class CharactersEventImpl
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.BaseEventImpl
-
- org.codehaus.stax2.ri.evt.CharactersEventImpl
-
- All Implemented Interfaces:
javax.xml.stream.events.Characters
,javax.xml.stream.events.XMLEvent
,javax.xml.stream.XMLStreamConstants
,XMLEvent2
public class CharactersEventImpl extends BaseEventImpl implements javax.xml.stream.events.Characters
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
mContent
(package private) boolean
mIgnorableWS
(package private) boolean
mIsCData
(package private) boolean
mIsWhitespace
(package private) boolean
mWhitespaceChecked
-
Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
mLocation
-
-
Constructor Summary
Constructors Modifier Constructor Description CharactersEventImpl(javax.xml.stream.Location loc, java.lang.String content, boolean cdata)
Constructor for regular unspecified (but non-CDATA) characters event type, which may or may not be all whitespace, but is not specified as ignorable white space.private
CharactersEventImpl(javax.xml.stream.Location loc, java.lang.String content, boolean cdata, boolean allWS, boolean ignorableWS)
Constructor for creating white space characters...
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.xml.stream.events.Characters
asCharacters()
static CharactersEventImpl
createIgnorableWS(javax.xml.stream.Location loc, java.lang.String content)
static CharactersEventImpl
createNonIgnorableWS(javax.xml.stream.Location loc, java.lang.String content)
boolean
equals(java.lang.Object o)
Declared abstract to force redefinition by sub-classesjava.lang.String
getData()
int
getEventType()
int
hashCode()
Declared abstract to force redefinition by sub-classesboolean
isCData()
boolean
isCharacters()
boolean
isIgnorableWhiteSpace()
boolean
isWhiteSpace()
void
setWhitespaceStatus(boolean status)
void
writeAsEncodedUnicode(java.io.Writer w)
protected static void
writeEscapedXMLText(java.io.Writer w, java.lang.String text)
void
writeUsing(XMLStreamWriter2 w)
-
Methods inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
addHash, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, iteratedEquals, stringsWithNullsEqual, throwFromIOE, toString
-
-
-
-
Constructor Detail
-
CharactersEventImpl
public CharactersEventImpl(javax.xml.stream.Location loc, java.lang.String content, boolean cdata)
Constructor for regular unspecified (but non-CDATA) characters event type, which may or may not be all whitespace, but is not specified as ignorable white space.
-
CharactersEventImpl
private CharactersEventImpl(javax.xml.stream.Location loc, java.lang.String content, boolean cdata, boolean allWS, boolean ignorableWS)
Constructor for creating white space characters...
-
-
Method Detail
-
createIgnorableWS
public static final CharactersEventImpl createIgnorableWS(javax.xml.stream.Location loc, java.lang.String content)
-
createNonIgnorableWS
public static final CharactersEventImpl createNonIgnorableWS(javax.xml.stream.Location loc, java.lang.String content)
-
asCharacters
public javax.xml.stream.events.Characters asCharacters()
- Specified by:
asCharacters
in interfacejavax.xml.stream.events.XMLEvent
- Overrides:
asCharacters
in classBaseEventImpl
-
getEventType
public int getEventType()
- Specified by:
getEventType
in interfacejavax.xml.stream.events.XMLEvent
- Specified by:
getEventType
in classBaseEventImpl
-
isCharacters
public boolean isCharacters()
- Specified by:
isCharacters
in interfacejavax.xml.stream.events.XMLEvent
- Overrides:
isCharacters
in classBaseEventImpl
-
writeAsEncodedUnicode
public void writeAsEncodedUnicode(java.io.Writer w) throws javax.xml.stream.XMLStreamException
- Specified by:
writeAsEncodedUnicode
in interfacejavax.xml.stream.events.XMLEvent
- Specified by:
writeAsEncodedUnicode
in classBaseEventImpl
- Throws:
javax.xml.stream.XMLStreamException
-
writeUsing
public void writeUsing(XMLStreamWriter2 w) throws javax.xml.stream.XMLStreamException
- Specified by:
writeUsing
in interfaceXMLEvent2
- Specified by:
writeUsing
in classBaseEventImpl
- Throws:
javax.xml.stream.XMLStreamException
-
getData
public java.lang.String getData()
- Specified by:
getData
in interfacejavax.xml.stream.events.Characters
-
isCData
public boolean isCData()
- Specified by:
isCData
in interfacejavax.xml.stream.events.Characters
-
isIgnorableWhiteSpace
public boolean isIgnorableWhiteSpace()
- Specified by:
isIgnorableWhiteSpace
in interfacejavax.xml.stream.events.Characters
-
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpace
in interfacejavax.xml.stream.events.Characters
-
setWhitespaceStatus
public void setWhitespaceStatus(boolean status)
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:BaseEventImpl
Declared abstract to force redefinition by sub-classes- Specified by:
equals
in classBaseEventImpl
-
hashCode
public int hashCode()
Description copied from class:BaseEventImpl
Declared abstract to force redefinition by sub-classes- Specified by:
hashCode
in classBaseEventImpl
-
writeEscapedXMLText
protected static void writeEscapedXMLText(java.io.Writer w, java.lang.String text) throws java.io.IOException
- Throws:
java.io.IOException
-
-