| com.jclark.xml.parse.CharacterDataEvent
All known Subclasses: com.jclark.xml.parse.EntityParser,
CharacterDataEvent | public interface CharacterDataEvent (Code) | | Information about character data.
There is no guarantee that consecutive characters will
be reported in the same CharacterDataEvent .
Surrogate pairs are guaranteed not to be split across
CharacterDataEvent s.
Line boundaries are normalized to '\n' (ASCII code 10).
See Also: com.jclark.xml.parse.base.Application.characterData version: $Revision: 1.6 $ $Date: 1998/06/10 09:43:54 $ |
Method Summary | |
int | copyChars(char[] cbuf, int off) Copies the character data into the specified character array
starting at index off . | int | getLength() Returns the length in chars of the character data. | int | getLengthMax() Returns an upper bound on the length of the character data. | boolean | isReference() Returns true if the character was a result of a character reference
or a predefined entity reference. | void | writeChars(Writer writer) Writes the character data to the specified Writer . |
copyChars | int copyChars(char[] cbuf, int off)(Code) | | Copies the character data into the specified character array
starting at index off .
The length of the array must be sufficient to hold all the
character data.
the number of characters of data(the same as returned by getLength ) |
getLength | int getLength()(Code) | | Returns the length in chars of the character data.
A character represented by a pair of surrogate chars
counts as 2 chars.
|
getLengthMax | int getLengthMax()(Code) | | Returns an upper bound on the length of the character data.
The value returned is guaranteed to be greater than or equal the value
returned by getLength .
This can be used to ensure that the buffer passed to
copyChars is large enough;
it is typically much faster to use getLengthMax
than getLength for this.
|
isReference | boolean isReference()(Code) | | Returns true if the character was a result of a character reference
or a predefined entity reference.
If this returns true, then
getLength and getLengthMax will return,
unless the referenced character is represented
as a surrogate pair in which case 2 will be returned.
|
writeChars | void writeChars(Writer writer) throws IOException(Code) | | Writes the character data to the specified Writer .
|
|
|