public class JsonWriterImpl extends Object implements JsonWriter
| Constructor and Description |
|---|
JsonWriterImpl(OutputStream out)
Constructs JsonWriter.
|
JsonWriterImpl(Writer writer)
Constructs JsonWriter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close output writer.
|
void |
flush()
Flush output writer.
|
void |
writeEndArray()
Write the end of JSON array ']'.
|
void |
writeEndObject()
Write the end of JSON object '}'.
|
void |
writeKey(String key)
Write the key.
|
void |
writeNull()
Write the null data to stream.
|
void |
writeStartArray()
Write the start of JSON array '['.
|
void |
writeStartObject()
Write the start of JSON object '{'.
|
void |
writeString(String value)
Write the String to stream.
|
void |
writeValue(boolean value)
Write the value of boolean type to stream.
|
void |
writeValue(double value)
Write the value of double type to stream.
|
void |
writeValue(long value)
Write the value of long type to stream.
|
public JsonWriterImpl(Writer writer)
writer - Writer.public JsonWriterImpl(OutputStream out)
out - OutputStream.public void writeStartObject()
throws JsonException
writeStartObject in interface JsonWriterJsonException - if any errors, include i/o errors occurs.public void writeEndObject()
throws JsonException
writeEndObject in interface JsonWriterJsonException - if any errors, include i/o errors occurs.public void writeStartArray()
throws JsonException
writeStartArray in interface JsonWriterJsonException - if any errors, include i/o errors occurs.public void writeEndArray()
throws JsonException
writeEndArray in interface JsonWriterJsonException - if any errors, include i/o errors occurs.public void writeKey(String key) throws JsonException
writeKey in interface JsonWriterkey - the key.JsonException - if any errors, include i/o errors occurs.public void writeString(String value) throws JsonException
writeString in interface JsonWritervalue - the String.JsonException - if any errors, include i/o errors occurs.public void writeValue(long value)
throws JsonException
writeValue in interface JsonWritervalue - the value of long type.JsonException - if any errors, include i/o errors occurs.public void writeValue(double value)
throws JsonException
writeValue in interface JsonWritervalue - the value of double type.JsonException - if any errors, include i/o errors occurs.public void writeValue(boolean value)
throws JsonException
writeValue in interface JsonWritervalue - the value of boolean type.JsonException - if any errors, include i/o errors occurs.public void writeNull()
throws JsonException
writeNull in interface JsonWriterJsonException - if any errors, include i/o errors occurs.public void flush()
throws JsonException
flush in interface JsonWriterJsonException - if any errors, include i/o errors occurs.public void close()
throws JsonException
close in interface JsonWriterJsonException - if any errors, include i/o errors occurs.Copyright © 2016 eXo Platform SAS. All Rights Reserved.