All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Interface com.jclark.xml.parse.CharacterDataEvent
  -  public interface CharacterDataEvent
Information about character data.
 There is no guarantee that consecutive characters will
 be reported in the sameCharacterDataEvent.
 Surrogate pairs are guaranteed not to be split across
 CharacterDataEvents.
 Line boundaries are normalized to '\n' (ASCII code 10).
    -  See Also:
    
-  characterData
   
  -   copyChars(char[], int) copyChars(char[], int)
-   Copies the character data into the specified character array
 starting at index off.
-   getLength() getLength()
-   Returns the length in chars of the character data.
  
-   getLengthMax() getLengthMax()
-   Returns an upper bound on the length of the character data.
  
-   isReference() isReference()
-   Returns true if the character was a result of a character reference
 or a predefined entity reference.
  
-   writeChars(Writer) writeChars(Writer)
-   Writes the character data to the specified Writer.
   
 getLength
getLength
 public abstract int getLength()
  -  Returns the length in chars of the character data.
 A character represented by a pair of surrogate chars
 counts as 2 chars.
 
 getLengthMax
getLengthMax
 public abstract int getLengthMax()
  -  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 tocopyCharsis large enough;
 it is typically much faster to usegetLengthMaxthangetLengthfor this.
 
 copyChars
copyChars
 public abstract int copyChars(char cbuf[],
                               int off)
  -  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.
   
- 
    -  Returns:
    
-  the number of characters of data
 (the same as returned by getLength)
 
 writeChars
writeChars
 public abstract void writeChars(Writer writer) throws IOException
  -  Writes the character data to the specified Writer.
 
 isReference
isReference
 public abstract boolean isReference()
  -  Returns true if the character was a result of a character reference
 or a predefined entity reference.
 If this returns true, then
 getLengthandgetLengthMaxwill return,
 unless the referenced character is represented
 as a surrogate pair in which case 2 will be returned.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index