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
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected char[]protected intprotected int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoid_len(int location) final CharBufadd(boolean b) final CharBufadd(byte i) add(byte[] chars) add(byte[] bytes, int start, int end) final CharBufadd(char ch) add(char[] chars) add(char[] chars, int length) final CharBufadd(double d) final CharBufadd(float d) final CharBufadd(int i) final CharBufadd(long l) final CharBufadd(short i) final CharBufaddBigDecimal(BigDecimal key) addBigInteger(BigInteger key) final CharBufaddBoolean(boolean b) final CharBufaddByte(byte i) final CharBufaddChar(byte i) final CharBufaddChar(char ch) final CharBufaddChar(int i) final CharBufaddChar(short i) final CharBufaddChars(char[] chars) final CharBufaddDouble(double d) final CharBuffinal CharBufaddFloat(float d) final CharBuffinal CharBufaddInt(int i) final CharBuffinal CharBufaddJsonEscapedString(char[] charArray) final CharBufaddJsonEscapedString(char[] charArray, boolean disableUnicodeEscaping) final CharBufaddJsonEscapedString(String jsonString) final CharBufaddJsonEscapedString(String jsonString, boolean disableUnicodeEscaping) final CharBufaddJsonFieldName(char[] chars) final CharBufaddJsonFieldName(char[] chars, boolean disableUnicodeEscaping) final CharBufaddJsonFieldName(String str) final CharBufaddJsonFieldName(String str, boolean disableUnicodeEscaping) addLine(CharSequence str) final CharBufaddLong(long l) final CharBuffinal voidaddNull()final CharBufaddQuoted(char[] chars) final CharBuffinal CharBufaddShort(short i) final CharBufbytecharcharAt(int index) voidclose()static CharBufcreate(char[] buffer) static CharBufcreate(int capacity) static CharBufcreateExact(int capacity) final CharBufdecodeJsonString(char[] chars) final CharBufdecodeJsonString(char[] chars, int start, int to) doublefloatvoidflush()voidinit()intintValue()intlen()intlength()longchar[]voidrecycle()voidvoidremoveLastChar(char expect) shortsubSequence(int start, int end) char[]toString()voidwrite(char[] cbuf, int off, int len) Methods inherited from class java.io.Writerappend, append, append, nullWriter, write, write, write, writeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequencechars, codePoints, isEmpty
- 
Field Details- 
capacityprotected int capacity
- 
locationprotected int location
- 
bufferprotected char[] buffer
 
- 
- 
Constructor Details- 
CharBufpublic CharBuf(char[] buffer) 
- 
CharBufpublic CharBuf(byte[] bytes) 
- 
CharBufprotected CharBuf(int capacity) 
- 
CharBufprotected CharBuf()
 
- 
- 
Method Details- 
createExact
- 
create
- 
create
- 
writepublic void write(char[] cbuf, int off, int len) 
- 
flush- Specified by:
- flushin interface- Flushable
- Specified by:
- flushin class- Writer
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- Writer
- Throws:
- IOException
 
- 
initpublic 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
- 
lengthpublic int length()- Specified by:
- lengthin interface- CharSequence
 
- 
charAtpublic char charAt(int index) - Specified by:
- charAtin interface- CharSequence
 
- 
subSequence- Specified by:
- subSequencein interface- CharSequence
 
- 
toString- Specified by:
- toStringin interface- CharSequence
- Overrides:
- toStringin class- Object
 
- 
toDebugString
- 
toStringAndRecycle
- 
lenpublic int len()
- 
toCharArraypublic char[] toCharArray()
- 
_lenpublic void _len(int location) 
- 
readForRecyclepublic char[] readForRecycle()
- 
recyclepublic void recycle()
- 
doubleValuepublic double doubleValue()
- 
floatValuepublic float floatValue()
- 
intValuepublic int intValue()
- 
longValuepublic long longValue()
- 
byteValuepublic byte byteValue()
- 
shortValuepublic short shortValue()
- 
toIntegerWrapper
- 
addNullpublic final void addNull()
- 
removeLastCharpublic void removeLastChar()
- 
removeLastCharpublic void removeLastChar(char expect) 
- 
addBigDecimal
- 
addBigInteger
- 
addLong
- 
addLong
- 
decodeJsonString
- 
decodeJsonString
 
-