Top Fields Constructors Methods
org.apache.xerces.stax.events

public final Class CharactersImpl

extends XMLEventImpl
implements Characters
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.Characters, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
java.io.IOException, .Writer, javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.Characters, org.apache.xerces.util.XMLChar

Author
Lucian Holland
Version
$Id: CharactersImpl.java 730471 2008-12-31 20:45:32Z mrglavas $

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
CharactersImpl(final String data, final int eventType, final Location location)

Standard constructor.

Method Summary

Modifier and TypeMethod and Description
public String
getData()

Implements javax.xml.stream.events.Characters.getData.

Get the character data of this event
public boolean
isCData()

Implements javax.xml.stream.events.Characters.isCData.

Returns true if this is a CData section.
public boolean
isIgnorableWhiteSpace()

Implements javax.xml.stream.events.Characters.isIgnorableWhiteSpace.

Return true if this is ignorableWhiteSpace.
public boolean
isWhiteSpace()

Implements javax.xml.stream.events.Characters.isWhiteSpace.

Returns true if this set of Characters is all whitespace.
public void
writeAsEncodedUnicode(Writer
The writer that will output the data
writer
)

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
Inherited from org.apache.xerces.stax.events.XMLEventImpl:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementtoString

Field Detail

fDataback to summary
private final String fData

Constructor Detail

CharactersImplback to summary
public CharactersImpl(final String data, final int eventType, final Location location)

Standard constructor.

Method Detail

getDataback to summary
public String getData()

Implements javax.xml.stream.events.Characters.getData.

Doc from javax.xml.stream.events.Characters.getData.

Get the character data of this event

Returns:String

the character data

See Also
javax.xml.stream.events.Characters#getData()
isCDataback to summary
public boolean isCData()

Implements javax.xml.stream.events.Characters.isCData.

Doc from javax.xml.stream.events.Characters.isCData.

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.

Returns:boolean

true if it is CDATA, false otherwise

See Also
javax.xml.stream.events.Characters#isCData()
isIgnorableWhiteSpaceback to summary
public boolean isIgnorableWhiteSpace()

Implements javax.xml.stream.events.Characters.isIgnorableWhiteSpace.

Doc from javax.xml.stream.events.Characters.isIgnorableWhiteSpace.

Return true if this is ignorableWhiteSpace. If this event is ignorableWhiteSpace its event type will be SPACE.

Returns:boolean

true if it is ignorable whitespace, false otherwise

See Also
javax.xml.stream.events.Characters#isIgnorableWhiteSpace()
isWhiteSpaceback to summary
public boolean isWhiteSpace()

Implements javax.xml.stream.events.Characters.isWhiteSpace.

Doc from javax.xml.stream.events.Characters.isWhiteSpace.

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

Returns:boolean

true if the Characters are all whitespace, false otherwise

See Also
javax.xml.stream.events.Characters#isWhiteSpace()
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

Doc from javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted. Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.

Parameters
writer:Writer

The writer that will output the data

Exceptions
XMLStreamException:
if there is a fatal error writing the event