public final class TextBuilder extends Object
StringBuilder
, 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 attribute values of a single XML start element.Constructor and Description |
---|
TextBuilder(int initialSize) |
Modifier and Type | Method and Description |
---|---|
void |
append(char c) |
void |
append(char[] src,
int start,
int len) |
char[] |
bufferFull(int needSpaceFor) |
String |
getAllValues() |
char[] |
getCharBuffer()
Method that gives access to underlying character buffer
|
int |
getCharSize() |
boolean |
isEmpty() |
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) |
String |
toString() |
public void reset()
public boolean isEmpty()
public String getAllValues()
public char[] getCharBuffer()
public int getCharSize()
public void append(char c)
public void append(char[] src, int start, int len)
public void setBufferSize(int newSize)
public char[] bufferFull(int needSpaceFor)
Copyright © 2018 FasterXML. All rights reserved.