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
IOException
AwsJsonWriter endArray() throws IOException
IOException
AwsJsonWriter beginObject() throws IOException
IOException
AwsJsonWriter endObject() throws IOException
IOException
AwsJsonWriter name(String name) throws IOException
name
- field nameIOException
AwsJsonWriter value(String value) throws IOException
String
valuevalue
- String
valueIOException
AwsJsonWriter value(boolean value) throws IOException
value
- boolean valueIOException
AwsJsonWriter value(double value) throws IOException
value
- double valueIOException
AwsJsonWriter value(long value) throws IOException
value
- long valueIOException
AwsJsonWriter 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
valueIOException
AwsJsonWriter 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
valueIOException
AwsJsonWriter value(ByteBuffer value) throws IOException
ByteBuffer
valuevalue
- ByteBuffer
valueIOException
AwsJsonWriter value() throws IOException
IOException
void flush() throws IOException
Writer
.IOException
void close() throws IOException
Writer
.IOException
Copyright © 2018. All rights reserved.