Main Page | Class Hierarchy | Class List | Class Members

org::jdom::input::TextBuffer Class Reference

List of all members.

Public Member Functions

String toString ()

Package Functions

 TextBuffer ()
void append (char[] source, int start, int count)
int size ()
void clear ()

Detailed Description

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.8
,
Date
2004/02/06 09:28:31
Author:
Bradley S. Huffman

Alex Rosen


Constructor & Destructor Documentation

org::jdom::input::TextBuffer::TextBuffer  )  [inline, package]
 

Constructor


Member Function Documentation

void org::jdom::input::TextBuffer::append char[]  source,
int  start,
int  count
[inline, package]
 

Append the specified text to the text value of this buffer.

void org::jdom::input::TextBuffer::clear  )  [inline, package]
 

Clears the text value and prepares the TextBuffer for reuse.

int org::jdom::input::TextBuffer::size  )  [inline, package]
 

Returns the size of the text value.

String org::jdom::input::TextBuffer::toString  )  [inline]
 

Returns the text value stored in the buffer.


The documentation for this class was generated from the following file:
Generated on Thu Dec 9 10:42:05 2004 for JDOM by  doxygen 1.3.9.1