Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xerces.readers
Interface XMLEntityHandler.CharBuffer

All Known Implementing Classes:
  ChunkyCharArray

Enclosing class:
  XMLEntityHandler

public static interface XMLEntityHandler.CharBuffer

This interface is used to store and retrieve character sequences. The primary use is for a literal data buffer where we can construct the values for literal entity replacement text. When all of the characters for the replacement text have been added to the buffer, the contents are added to the string pool for later use in constructing a StringReader if the entity is referenced.

Method Summary
`int` | `addString(int offset, int length)` Add a region of this buffer to the string pool.
`void` | `append(char ch)` Append a character to this buffer.
`void` | `append(char[] chars, int offset, int length)` Append characters to this buffer.
`int` | `length()` Get the current length of the buffer.

Method Detail

### append

    public void append(char ch)

  Append a character to this buffer.
  Parameters:
    `ch` - The character.

### append

    public void append(char[] chars,
                       int offset,
                       int length)

  Append characters to this buffer.
  Parameters:
    `chars` - The char array containing the characters.
    `offset` - The offset within the char array of the first character to append.
    `length` - The number of characters to append.

### length

    public int length()

  Get the current length of the buffer. This is also the offset of the next character that is added to the buffer.
  Returns:
    The length of the buffer.

### addString

    public int addString(int offset,
                         int length)

  Add a region of this buffer to the string pool.
  Parameters:
    `offset` - The offset within this buffer of the first character of the string.
    `length` - The number of characters in the string.
  Returns:
    The `StringPool` handle of the string.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2001 Apache XML Project. All Rights Reserved.