StrictCharacterStreamJsonWriter
public interface StrictJsonWriter
Modifier and Type | Method | Description |
---|---|---|
boolean |
isTruncated() |
Return true if the output has been truncated due to exceeding any maximum length specified in settings.
|
void |
writeBoolean(boolean value) |
Writes a boolean to the writer.
|
void |
writeBoolean(String name,
boolean value) |
Writes a a member with a boolean value to the writer.
|
void |
writeEndArray() |
Writes the end of a JSON array to the writer.
|
void |
writeEndObject() |
Writes the end of a JSON object to the writer.
|
void |
writeName(String name) |
Writes the name of a member to the writer.
|
void |
writeNull() |
Writes a null value to the writer.
|
void |
writeNull(String name) |
Writes a member with a null value to the writer.
|
void |
writeNumber(String value) |
Writes a number to the writer.
|
void |
writeNumber(String name,
String value) |
Writes a member with a numeric value to the writer.
|
void |
writeRaw(String value) |
Writes a raw value without quoting or escaping.
|
void |
writeRaw(String name,
String value) |
Writes a member with a raw value without quoting or escaping.
|
void |
writeStartArray() |
Writes the start of a array to the writer.
|
void |
writeStartArray(String name) |
Writes the start of JSON array member to the writer.
|
void |
writeStartObject() |
Writes the start of a JSON object to the writer.
|
void |
writeStartObject(String name) |
Writes the start of a JSON object member to the writer.
|
void |
writeString(String value) |
Writes a String to the writer.
|
void |
writeString(String name,
String value) |
Writes a member with a string value to the writer.
|
void writeName(String name)
name
- the member nameBsonInvalidOperationException
- if not in the correct state to write a member nameBSONException
- if the underlying Writer throws an IOExceptionvoid writeBoolean(boolean value)
value
- the boolean value.BsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeBoolean(String name, boolean value)
name
- the member namevalue
- the boolean valueBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeNumber(String value)
value
- the Double value, as a String so that clients can take full control over formattingBsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeNumber(String name, String value)
name
- the member namevalue
- the Double value, as a String so that clients can take full control over formattingBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeString(String value)
value
- the String valueBsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeString(String name, String value)
name
- the member namevalue
- the String valueBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeRaw(String value)
value
- the String valueBsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeRaw(String name, String value)
name
- the member namevalue
- the raw valueBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeNull()
BsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeNull(String name)
name
- the member nameBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeStartArray()
BsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeStartArray(String name)
name
- the member nameBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeStartObject()
BsonInvalidOperationException
- if not in the correct state to write a valueBSONException
- if the underlying Writer throws an IOExceptionvoid writeStartObject(String name)
name
- the member nameBsonInvalidOperationException
- if not in the correct state to write a memberBSONException
- if the underlying Writer throws an IOExceptionvoid writeEndArray()
BsonInvalidOperationException
- if not in the correct state to write the end of an arrayBSONException
- if the underlying Writer throws an IOExceptionvoid writeEndObject()
BsonInvalidOperationException
- if not in the correct state to write the end of an objectBSONException
- if the underlying Writer throws an IOExceptionboolean isTruncated()