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
-
-
Method Summary
-
Methods inherited from class java.io.Writer
append, append, append, nullWriter, write, write, write, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Method Detail
-
createExact
public static CharBuf createExact(int capacity)
-
create
public static CharBuf create(int capacity)
-
create
public static CharBuf create(char[] buffer)
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
init
public void init()
-
add
public final CharBuf add(int i)
-
addInt
public final CharBuf addInt(int i)
-
add
public final CharBuf add(boolean b)
-
addBoolean
public final CharBuf addBoolean(boolean b)
-
add
public final CharBuf add(byte i)
-
addByte
public final CharBuf addByte(byte i)
-
add
public final CharBuf add(short i)
-
addShort
public final CharBuf addShort(short i)
-
add
public final CharBuf add(long l)
-
add
public final CharBuf add(double d)
-
addDouble
public final CharBuf addDouble(double d)
-
add
public final CharBuf add(float d)
-
addFloat
public final CharBuf addFloat(float d)
-
addChar
public final CharBuf addChar(byte i)
-
addChar
public final CharBuf addChar(int i)
-
addChar
public final CharBuf addChar(short i)
-
addChar
public final CharBuf addChar(char ch)
-
addLine
public CharBuf addLine(CharSequence str)
-
add
public CharBuf add(char[] chars)
-
addChars
public final CharBuf addChars(char[] chars)
-
addQuoted
public final CharBuf addQuoted(char[] chars)
-
addJsonEscapedString
public final CharBuf addJsonEscapedString(String jsonString, boolean disableUnicodeEscaping)
-
addJsonEscapedString
public final CharBuf addJsonEscapedString(char[] charArray)
-
addJsonEscapedString
public final CharBuf addJsonEscapedString(char[] charArray, boolean disableUnicodeEscaping)
-
addJsonFieldName
public final CharBuf addJsonFieldName(char[] chars)
-
addJsonFieldName
public final CharBuf addJsonFieldName(char[] chars, boolean disableUnicodeEscaping)
-
add
public CharBuf add(char[] chars, int length)
-
add
public CharBuf add(byte[] chars)
-
add
public CharBuf add(byte[] bytes, int start, int end)
-
add
public final CharBuf add(char ch)
-
length
public int length()
- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index)
- Specified by:
charAt
in interfaceCharSequence
-
subSequence
public CharSequence subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
-
toString
public String toString()
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
toDebugString
public String toDebugString()
-
toStringAndRecycle
public String 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
public Number toIntegerWrapper()
-
addNull
public final void addNull()
-
removeLastChar
public void removeLastChar()
-
removeLastChar
public void removeLastChar(char expect)
-
addBigDecimal
public CharBuf addBigDecimal(BigDecimal key)
-
addBigInteger
public CharBuf addBigInteger(BigInteger key)
-
addLong
public final CharBuf addLong(long l)
-
decodeJsonString
public final CharBuf decodeJsonString(char[] chars)
-
decodeJsonString
public final CharBuf decodeJsonString(char[] chars, int start, int to)
-
-