public class Utf8StringBuilder extends Utf8Appendable
Utf8Appendable.append(byte) may be needed before
state a character is appended to the buffer.
The UTF-8 decoding is done by this class and no additional buffers or Readers are used.Utf8Appendable.NotUtf8Exception_appendable, _state, REPLACEMENT, REPLACEMENT_UTF8| Constructor and Description |
|---|
Utf8StringBuilder()
Create an Utf8StringBuilder
|
Utf8StringBuilder(int capacity)
Create an Utf8StringBuilder
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(char c)
Append a single char
|
void |
append(char[] chars)
Append some chars
|
void |
clear()
Clear all the char in this content.
|
int |
length() |
void |
reset() |
char[] |
toChars()
Return the content as chars
|
String |
toString() |
append, append, append, append, appendByte, checkState, isUtf8SequenceComplete, toReplacedStringpublic Utf8StringBuilder()
public Utf8StringBuilder(int capacity)
capacity - The initial capacitypublic char[] toChars()
public void clear()
public int length()
length in class Utf8Appendablepublic void reset()
reset in class Utf8Appendablepublic void append(char[] chars)
chars - The chars to appendpublic void append(char c)
c - The char to appendCopyright © 2018 Alternet. All rights reserved.