Package org.apache.groovy.json.internal
Class CharBuf
java.lang.Object
java.io.Writer
org.apache.groovy.json.internal.CharBuf
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable,CharSequence
public class CharBuf extends Writer implements CharSequence
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void_len(int location)CharBufadd(boolean b)CharBufadd(byte i)CharBufadd(byte[] chars)CharBufadd(byte[] bytes, int start, int end)CharBufadd(char ch)CharBufadd(char[] chars)CharBufadd(char[] chars, int length)CharBufadd(double d)CharBufadd(float d)CharBufadd(int i)CharBufadd(long l)CharBufadd(short i)CharBufadd(String str)CharBufaddBigDecimal(BigDecimal key)CharBufaddBigInteger(BigInteger key)CharBufaddBoolean(boolean b)CharBufaddByte(byte i)CharBufaddChar(byte i)CharBufaddChar(char ch)CharBufaddChar(int i)CharBufaddChar(short i)CharBufaddChars(char[] chars)CharBufaddDouble(double d)CharBufaddDouble(Double key)CharBufaddFloat(float d)CharBufaddFloat(Float key)CharBufaddInt(int i)CharBufaddInt(Integer key)CharBufaddJsonEscapedString(char[] charArray)CharBufaddJsonEscapedString(char[] charArray, boolean disableUnicodeEscaping)CharBufaddJsonEscapedString(String jsonString)CharBufaddJsonEscapedString(String jsonString, boolean disableUnicodeEscaping)CharBufaddJsonFieldName(char[] chars)CharBufaddJsonFieldName(char[] chars, boolean disableUnicodeEscaping)CharBufaddJsonFieldName(String str)CharBufaddJsonFieldName(String str, boolean disableUnicodeEscaping)CharBufaddLine(CharSequence str)CharBufaddLine(String str)CharBufaddLong(long l)CharBufaddLong(Long key)voidaddNull()CharBufaddQuoted(char[] chars)CharBufaddQuoted(String str)CharBufaddShort(short i)CharBufaddString(String str)bytebyteValue()charcharAt(int index)voidclose()static CharBufcreate(char[] buffer)static CharBufcreate(int capacity)static CharBufcreateExact(int capacity)CharBufdecodeJsonString(char[] chars)CharBufdecodeJsonString(char[] chars, int start, int to)doubledoubleValue()floatfloatValue()voidflush()voidinit()intintValue()intlen()intlength()longlongValue()char[]readForRecycle()voidrecycle()voidremoveLastChar()voidremoveLastChar(char expect)shortshortValue()CharSequencesubSequence(int start, int end)char[]toCharArray()StringtoDebugString()NumbertoIntegerWrapper()StringtoString()StringtoStringAndRecycle()voidwrite(char[] cbuf, int off, int len)Methods inherited from class java.io.Writer
append, append, append, nullWriter, write, write, write, write
-
Field Details
-
Constructor Details
-
Method Details
-
createExact
-
create
-
create
-
write
public void write(char[] cbuf, int off, int len) -
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
init
public void init() -
add
-
addString
-
add
-
addInt
-
addInt
-
add
-
addBoolean
-
add
-
addByte
-
add
-
addShort
-
add
-
add
-
addDouble
-
addDouble
-
add
-
addFloat
-
addFloat
-
addChar
-
addChar
-
addChar
-
addChar
-
addLine
-
addLine
-
add
-
addChars
-
addQuoted
-
addJsonEscapedString
-
addJsonEscapedString
-
addJsonEscapedString
-
addJsonEscapedString
-
addJsonFieldName
-
addJsonFieldName
-
addJsonFieldName
-
addJsonFieldName
-
addQuoted
-
add
-
add
-
add
-
add
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index)- Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
toDebugString
-
toStringAndRecycle
-
len
public int len() -
toCharArray
public char[] toCharArray() -
_len
public void _len(int location) -
readForRecycle
public char[] readForRecycle() -
recycle
public void recycle() -
doubleValue
public double doubleValue() -
floatValue
public float floatValue() -
intValue
public int intValue() -
longValue
public long longValue() -
byteValue
public byte byteValue() -
shortValue
public short shortValue() -
toIntegerWrapper
-
addNull
public final void addNull() -
removeLastChar
public void removeLastChar() -
removeLastChar
public void removeLastChar(char expect) -
addBigDecimal
-
addBigInteger
-
addLong
-
addLong
-
decodeJsonString
-
decodeJsonString
-