public class CharBuf extends Writer implements CharSequence
| Modifier and Type | Field and Description |
|---|---|
protected char[] |
buffer |
protected int |
capacity |
protected static int |
DOUBLE_QUOTE |
protected static int |
ESCAPE |
protected static int |
FORWARD_SLASH |
protected static int |
LETTER_B |
protected static int |
LETTER_F |
protected static int |
LETTER_N |
protected static int |
LETTER_R |
protected static int |
LETTER_T |
protected static int |
LETTER_U |
protected int |
location |
| Modifier | Constructor and Description |
|---|---|
protected |
CharBuf() |
|
CharBuf(byte[] bytes) |
|
CharBuf(char[] buffer) |
protected |
CharBuf(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
_len(int location) |
CharBuf |
add(boolean b) |
CharBuf |
add(byte i) |
CharBuf |
add(byte[] chars) |
CharBuf |
add(byte[] bytes,
int start,
int end) |
CharBuf |
add(char ch) |
CharBuf |
add(char[] chars) |
CharBuf |
add(char[] chars,
int length) |
CharBuf |
add(double d) |
CharBuf |
add(float d) |
CharBuf |
add(int i) |
CharBuf |
add(long l) |
CharBuf |
add(short i) |
CharBuf |
add(String str) |
void |
addAsUTF(byte[] value) |
CharBuf |
addBigDecimal(BigDecimal key) |
CharBuf |
addBigInteger(BigInteger key) |
CharBuf |
addBoolean(boolean b) |
CharBuf |
addByte(byte i) |
CharBuf |
addChar(byte i) |
CharBuf |
addChar(char ch) |
CharBuf |
addChar(int i) |
CharBuf |
addChar(short i) |
CharBuf |
addChars(char[] chars) |
CharBuf |
addDouble(double d) |
CharBuf |
addDouble(Double key) |
CharBuf |
addFloat(float d) |
CharBuf |
addFloat(Float key) |
CharSequence |
addHex(int decoded)
Turn a single bytes into two hex character representation.
|
CharBuf |
addInt(int i) |
CharBuf |
addInt(Integer key) |
CharBuf |
addJsonEscapedString(char[] charArray) |
CharBuf |
addJsonEscapedString(String jsonString) |
CharBuf |
addJsonFieldName(char[] chars) |
CharBuf |
addJsonFieldName(String str) |
CharBuf |
addLine(CharSequence str) |
CharBuf |
addLine(String str) |
CharBuf |
addLong(long l) |
CharBuf |
addLong(Long key) |
void |
addNull() |
CharBuf |
addObject(Object object) |
CharBuf |
addQuoted(char[] chars) |
CharBuf |
addQuoted(String str) |
CharBuf |
addShort(short i) |
CharBuf |
addString(String str) |
byte |
byteValue() |
char |
charAt(int index) |
void |
close() |
static CharBuf |
create(char[] buffer) |
static CharBuf |
create(int capacity) |
static CharBuf |
createExact(int capacity) |
static CharBuf |
createFromUTF8Bytes(byte[] buffer) |
CharBuf |
decodeJsonString(byte[] bytes,
int start,
int to) |
CharBuf |
decodeJsonString(char[] chars) |
CharBuf |
decodeJsonString(char[] chars,
int start,
int to) |
CharBuf |
decodeJsonStringAscii(byte[] bytes,
int start,
int to) |
double |
doubleValue() |
protected static int |
encodeNibbleToHexAsciiCharByte(int nibble)
Turns a single nibble into an ascii HEX digit.
|
void |
ensure(int i) |
float |
floatValue() |
void |
flush() |
void |
init() |
int |
intValue() |
int |
len() |
int |
length() |
long |
longValue() |
static void |
main(String... args) |
char[] |
readForRecycle() |
void |
recycle() |
void |
removeLastChar() |
short |
shortValue() |
CharSequence |
subSequence(int start,
int end) |
char[] |
toCharArray() |
String |
toDebugString() |
Number |
toIntegerWrapper() |
String |
toString() |
String |
toStringAndRecycle() |
void |
write(char[] cbuf,
int off,
int len) |
protected int capacity
protected int location
protected char[] buffer
protected static final int DOUBLE_QUOTE
protected static final int ESCAPE
protected static final int LETTER_N
protected static final int LETTER_U
protected static final int LETTER_T
protected static final int LETTER_R
protected static final int LETTER_B
protected static final int LETTER_F
protected static final int FORWARD_SLASH
public CharBuf(char[] buffer)
public CharBuf(byte[] bytes)
protected CharBuf(int capacity)
protected CharBuf()
public static CharBuf createExact(int capacity)
public static CharBuf create(int capacity)
public static CharBuf create(char[] buffer)
public static CharBuf createFromUTF8Bytes(byte[] buffer)
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionpublic void init()
public final CharBuf add(int i)
public final CharBuf addInt(int i)
public final CharBuf add(boolean b)
public final CharBuf addBoolean(boolean b)
public final CharBuf add(byte i)
public final CharBuf addByte(byte i)
public final CharBuf add(short i)
public final CharBuf addShort(short i)
public final CharBuf add(long l)
public final CharBuf add(double d)
public final CharBuf addDouble(double d)
public final CharBuf add(float d)
public final CharBuf addFloat(float d)
public final CharBuf addChar(byte i)
public final CharBuf addChar(int i)
public final CharBuf addChar(short i)
public final CharBuf addChar(char ch)
public CharBuf addLine(CharSequence str)
public CharBuf add(char[] chars)
public final CharBuf addChars(char[] chars)
public final CharBuf addQuoted(char[] chars)
public static void main(String... args)
public final CharBuf addJsonEscapedString(char[] charArray)
public final CharBuf addJsonFieldName(char[] chars)
public CharBuf add(char[] chars, int length)
public CharBuf add(byte[] chars)
public CharBuf add(byte[] bytes, int start, int end)
public final CharBuf add(char ch)
public int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic String toString()
toString in interface CharSequencetoString in class Objectpublic String toDebugString()
public String toStringAndRecycle()
public int len()
public char[] toCharArray()
public void _len(int location)
public char[] readForRecycle()
public void recycle()
public double doubleValue()
public float floatValue()
public int intValue()
public long longValue()
public byte byteValue()
public short shortValue()
public Number toIntegerWrapper()
public void addAsUTF(byte[] value)
public final void addNull()
public void removeLastChar()
public CharBuf addBigDecimal(BigDecimal key)
public CharBuf addBigInteger(BigInteger key)
public final CharBuf addLong(long l)
public CharSequence addHex(int decoded)
decoded - the byte to serializeObject.protected static int encodeNibbleToHexAsciiCharByte(int nibble)
nibble - the nibble to serializeObject.public final CharBuf decodeJsonString(char[] chars)
public final CharBuf decodeJsonString(char[] chars, int start, int to)
public final CharBuf decodeJsonString(byte[] bytes, int start, int to)
public final CharBuf decodeJsonStringAscii(byte[] bytes, int start, int to)
public void ensure(int i)
Copyright © 2014. All rights reserved.