|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ctc.wstx.util.TextBuilder
Class similar to StringBuffer, except that it can be used to
construct multiple Strings, that will share same underlying character
buffer. This is generally useful for closely related value Strings, such
as value Strings of a single XML start element.
| Constructor Summary | |
TextBuilder(int initialSize)
|
|
| Method Summary | |
void |
append(char c)
|
void |
append(char[] src,
int start,
int len)
|
char[] |
bufferFull(int needSpaceFor)
|
char[] |
getCharBuffer()
Method that gives access to underlying character buffer |
int |
getCharSize()
|
java.lang.String |
getEntry(int index)
|
void |
getEntry(int index,
java.io.Writer w)
|
int |
getOffset(int index)
|
boolean |
isEmpty()
|
java.lang.String |
normalizeSpaces(int index)
Method called to try to normalize white spaces in one of entries. |
void |
reset()
Method called before starting to (re)use the buffer, will discard any existing content, and start collecting new set of values. |
void |
setBufferSize(int newSize)
|
int |
size()
|
void |
startNewEntry()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TextBuilder(int initialSize)
| Method Detail |
public void reset()
public boolean isEmpty()
public int size()
public java.lang.String getEntry(int index)
public void getEntry(int index,
java.io.Writer w)
throws java.io.IOException
java.io.IOExceptionpublic int getOffset(int index)
public char[] getCharBuffer()
public int getCharSize()
public void startNewEntry()
public void append(char c)
public void append(char[] src,
int start,
int len)
public void setBufferSize(int newSize)
public char[] bufferFull(int needSpaceFor)
public java.lang.String normalizeSpaces(int index)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||