Creates the standard top-level JDOM classes (Element, Document, Comment, etc). A subclass of this factory might construct custom classes.
@version $Revision: 1.7 $, $Date: 2007/11/10 05:28:58 $
@author Ken Rune Holland
@author Phil Nelson
@author Bradley S. Huffman
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.