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(java.lang.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(java.nio.ByteBuffer value)
Writes a
ByteBuffer value |
AwsJsonWriter |
value(java.util.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(java.lang.Number value)
Writes a
Number value. |
AwsJsonWriter |
value(java.lang.String value)
Writes a
String value |
AwsJsonWriter beginArray() throws java.io.IOException
java.io.IOException
AwsJsonWriter endArray() throws java.io.IOException
java.io.IOException
AwsJsonWriter beginObject() throws java.io.IOException
java.io.IOException
AwsJsonWriter endObject() throws java.io.IOException
java.io.IOException
AwsJsonWriter name(java.lang.String name) throws java.io.IOException
name
- field namejava.io.IOException
AwsJsonWriter value(java.lang.String value) throws java.io.IOException
String
valuevalue
- String
valuejava.io.IOException
AwsJsonWriter value(boolean value) throws java.io.IOException
value
- boolean valuejava.io.IOException
AwsJsonWriter value(double value) throws java.io.IOException
value
- double valuejava.io.IOException
AwsJsonWriter value(long value) throws java.io.IOException
value
- long valuejava.io.IOException
AwsJsonWriter value(java.lang.Number value) throws java.io.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
valuejava.io.IOException
AwsJsonWriter value(java.util.Date value) throws java.io.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
valuejava.io.IOException
AwsJsonWriter value(java.nio.ByteBuffer value) throws java.io.IOException
ByteBuffer
valuevalue
- ByteBuffer
valuejava.io.IOException
AwsJsonWriter value() throws java.io.IOException
java.io.IOException
void flush() throws java.io.IOException
Writer
.java.io.IOException
void close() throws java.io.IOException
Writer
.java.io.IOException