public final class StrictCharacterStreamJsonWriter extends java.lang.Object implements StrictJsonWriter
Writer
.Constructor and Description |
---|
StrictCharacterStreamJsonWriter(java.io.Writer writer,
StrictCharacterStreamJsonWriterSettings settings)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentLength()
Gets the current length of the JSON text.
|
boolean |
isTruncated()
Return true if the output has been truncated due to exceeding the length specified in
StrictCharacterStreamJsonWriterSettings.maxLength . |
void |
writeBoolean(boolean value)
Writes a boolean to the writer.
|
void |
writeBoolean(java.lang.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(java.lang.String name)
Writes the name of a member to the writer.
|
void |
writeNull()
Writes a null value to the writer.
|
void |
writeNull(java.lang.String name)
Writes a member with a null value to the writer.
|
void |
writeNumber(java.lang.String value)
Writes a number to the writer.
|
void |
writeNumber(java.lang.String name,
java.lang.String value)
Writes a member with a numeric value to the writer.
|
void |
writeRaw(java.lang.String value)
Writes a raw value without quoting or escaping.
|
void |
writeRaw(java.lang.String name,
java.lang.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(java.lang.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(java.lang.String name)
Writes the start of a JSON object member to the writer.
|
void |
writeString(java.lang.String value)
Writes a String to the writer.
|
void |
writeString(java.lang.String name,
java.lang.String value)
Writes a member with a string value to the writer.
|
public StrictCharacterStreamJsonWriter(java.io.Writer writer, StrictCharacterStreamJsonWriterSettings settings)
writer
- the writer to write JSON to.settings
- the settings to apply to this writer.public int getCurrentLength()
public void writeStartObject(java.lang.String name)
StrictJsonWriter
writeStartObject
in interface StrictJsonWriter
name
- the member namepublic void writeStartArray(java.lang.String name)
StrictJsonWriter
writeStartArray
in interface StrictJsonWriter
name
- the member namepublic void writeBoolean(java.lang.String name, boolean value)
StrictJsonWriter
writeBoolean
in interface StrictJsonWriter
name
- the member namevalue
- the boolean valuepublic void writeNumber(java.lang.String name, java.lang.String value)
StrictJsonWriter
writeNumber
in interface StrictJsonWriter
name
- the member namevalue
- the Double value, as a String so that clients can take full control over formattingpublic void writeString(java.lang.String name, java.lang.String value)
StrictJsonWriter
writeString
in interface StrictJsonWriter
name
- the member namevalue
- the String valuepublic void writeRaw(java.lang.String name, java.lang.String value)
StrictJsonWriter
writeRaw
in interface StrictJsonWriter
name
- the member namevalue
- the raw valuepublic void writeNull(java.lang.String name)
StrictJsonWriter
writeNull
in interface StrictJsonWriter
name
- the member namepublic void writeName(java.lang.String name)
StrictJsonWriter
writeName
in interface StrictJsonWriter
name
- the member namepublic void writeBoolean(boolean value)
StrictJsonWriter
writeBoolean
in interface StrictJsonWriter
value
- the boolean value.public void writeNumber(java.lang.String value)
StrictJsonWriter
writeNumber
in interface StrictJsonWriter
value
- the Double value, as a String so that clients can take full control over formattingpublic void writeString(java.lang.String value)
StrictJsonWriter
writeString
in interface StrictJsonWriter
value
- the String valuepublic void writeRaw(java.lang.String value)
StrictJsonWriter
writeRaw
in interface StrictJsonWriter
value
- the String valuepublic void writeNull()
StrictJsonWriter
writeNull
in interface StrictJsonWriter
public void writeStartObject()
StrictJsonWriter
writeStartObject
in interface StrictJsonWriter
public void writeStartArray()
StrictJsonWriter
writeStartArray
in interface StrictJsonWriter
public void writeEndObject()
StrictJsonWriter
writeEndObject
in interface StrictJsonWriter
public void writeEndArray()
StrictJsonWriter
writeEndArray
in interface StrictJsonWriter
public boolean isTruncated()
StrictCharacterStreamJsonWriterSettings.maxLength
.isTruncated
in interface StrictJsonWriter
StrictCharacterStreamJsonWriterSettings.maxLength
Copyright © 2010 - 2020 Adobe. All Rights Reserved