|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CharacterDataReader
Optional interface implemented by XMLStreamReader
implementations that support writing character data directly to a
Writer
.
All the requirements outlined in org.apache.axiom.ext.stax
apply to
this extension interface. In particular, to get a reference to the extension,
the consumer MUST call XMLStreamReader.getProperty(String)
with PROPERTY
as the property name.
Field Summary | |
---|---|
static String |
PROPERTY
The name of the property used to look up this extension interface from a XMLStreamReader implementation. |
Method Summary | |
---|---|
void |
writeTextTo(Writer writer)
Output the character data for the current event to the given writer. |
Field Detail |
---|
static final String PROPERTY
XMLStreamReader
implementation.
Method Detail |
---|
void writeTextTo(Writer writer) throws XMLStreamException, IOException
reader.writeTextTo(writer)
has the same effect as
writer.write(reader.getText())
. However, the implementation
MAY choose to split the character data differently. E.g. it MAY write the
character data in multiple chunks or it MAY choose to process more
character data in a single event than would be returned by
XMLStreamReader.getText()
. Therefore, using this
method together with XMLStreamReader.getText()
,
XMLStreamReader.getTextCharacters()
,
XMLStreamReader.getTextStart()
,
XMLStreamReader.getTextLength()
or
XMLStreamReader.getTextCharacters(int, char[], int, int)
is not supported and may lead to undefined results.
The implementation SHOULD avoid any unnecessary conversions between strings and character arrays.
writer
- the writer to write the character data to
XMLStreamException
- if the underlying XML source is not well-formed
IOException
- if an I/O error occurs when writing the character data
IllegalStateException
- if this state is not a valid text state.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |