public interface AwsJsonWriter
| Modifier and Type | Method and Description |
|---|---|
AwsJsonWriter |
beginArray()
Writes the character '[' as the beginning of an array
|
AwsJsonWriter |
beginObject()
Writes the character '{' as the beginning of an object
|
void |
close()
Flushes and closes this writer as well as the underlying
Writer. |
AwsJsonWriter |
endArray()
Writes the character ']' as the end of an array
|
AwsJsonWriter |
endObject()
Writes the character '}' as the end of an object
|
void |
flush()
Makes sure all buffered data is written to the underlying
Writer. |
AwsJsonWriter |
name(String name)
Writes the field name in an object
|
AwsJsonWriter |
value()
Writes a null value, i.e.
|
AwsJsonWriter |
value(boolean value)
Writes a boolean value, either true or false
|
AwsJsonWriter |
value(ByteBuffer value)
Writes a
ByteBuffer value |
AwsJsonWriter |
value(Date value)
Writes a
Date value as epoch time in seconds in a number format. |
AwsJsonWriter |
value(double value)
Writes a double value
|
AwsJsonWriter |
value(long value)
Writes a long value
|
AwsJsonWriter |
value(Number value)
Writes a
Number value. |
AwsJsonWriter |
value(String value)
Writes a
String value |
AwsJsonWriter beginArray() throws IOException
IOExceptionAwsJsonWriter endArray() throws IOException
IOExceptionAwsJsonWriter beginObject() throws IOException
IOExceptionAwsJsonWriter endObject() throws IOException
IOExceptionAwsJsonWriter name(String name) throws IOException
name - field nameIOExceptionAwsJsonWriter value(String value) throws IOException
String valuevalue - String valueIOExceptionAwsJsonWriter value(boolean value) throws IOException
value - boolean valueIOExceptionAwsJsonWriter value(double value) throws IOException
value - double valueIOExceptionAwsJsonWriter value(long value) throws IOException
value - long valueIOExceptionAwsJsonWriter value(Number value) throws IOException
Number value. It outputs the string representation of
the value by invoking Object.toString(). Unlike passing
Object.toString() to value(String), this doesn't include
double quote.value - Number valueIOExceptionAwsJsonWriter value(Date value) throws IOException
Date value as epoch time in seconds in a number format.
For example, new Date(1423875641895L) will be encoded as a
number 1423875641.895.value - Date valueIOExceptionAwsJsonWriter value(ByteBuffer value) throws IOException
ByteBuffer valuevalue - ByteBuffer valueIOExceptionAwsJsonWriter value() throws IOException
IOExceptionvoid flush()
throws IOException
Writer.IOExceptionvoid close()
throws IOException
Writer.IOExceptionCopyright © 2017. All rights reserved.