| java.lang.Object org.jdom.input.TextBuffer
TextBuffer | class TextBuffer (Code) | | A non-public utility class similar to StringBuffer but optimized for XML
parsing where the common case is that you get only one chunk of characters
per text section. TextBuffer stores the first chunk of characters in a
String, which can just be returned directly if no second chunk is received.
Subsequent chunks are stored in a supplemental char array (like StringBuffer
uses). In this case, the returned text will be the first String chunk,
concatenated with the subsequent chunks stored in the char array. This
provides optimal performance in the common case, while still providing very
good performance in the uncommon case. Furthermore, avoiding StringBuffer
means that no extra unused char array space will be kept around after parsing
is through.
version: $Revision: 1.1 $, $Date: 2005/04/27 09:32:41 $ author: Bradley S. Huffman author: Alex Rosen |
Method Summary | |
void | append(char[] source, int start, int count) Append the specified text to the text value of this buffer. | void | clear() Clears the text value and prepares the TextBuffer for reuse. | int | size() Returns the size of the text value. | public String | toString() Returns the text value stored in the buffer. |
TextBuffer | TextBuffer()(Code) | | Constructor
|
append | void append(char[] source, int start, int count)(Code) | | Append the specified text to the text value of this buffer.
|
clear | void clear()(Code) | | Clears the text value and prepares the TextBuffer for reuse.
|
size | int size()(Code) | | Returns the size of the text value.
|
toString | public String toString()(Code) | | Returns the text value stored in the buffer.
|
|
|