public class JsonWriter
extends java.io.Writer
| Modifier and Type | Field and Description |
|---|---|
java.lang.StringBuilder |
buffer |
char[] |
tmp |
| Constructor and Description |
|---|
JsonWriter() |
JsonWriter(int size) |
JsonWriter(java.lang.StringBuilder sb) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
byte[] |
toBytes() |
java.lang.String |
toString() |
void |
write(char[] buf,
int off,
int len) |
void |
write(int c) |
void |
write(java.lang.String str,
int off,
int len) |
public JsonWriter()
public JsonWriter(int size)
public JsonWriter(java.lang.StringBuilder sb)
public void write(int c)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void write(char[] buf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void flush()
flush in interface java.io.Flushableflush in class java.io.Writerpublic java.lang.String toString()
toString in class java.lang.Objectpublic byte[] toBytes()
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Writer