A support class for {@link SAXBuilder}.
@version $Revision: 1.73 $, $Date: 2007/11/10 05:29:00 $
@author Brett McLaughlin
@author Jason Hunter
@author Philip Nelson
@author Bradley S. Huffman
@author phil@triloggroup.com
A non-public utility class similar to StringBuilder 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 StringBuilder 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 StringBuilder means that no extra unused char array space will be kept around after parsing is through.
@author Bradley S. Huffman
@author Alex Rosen
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.