Package com.backblaze.b2.json
Class B2JsonWriter
- java.lang.Object
-
- com.backblaze.b2.json.B2JsonWriter
-
public class B2JsonWriter extends java.lang.ObjectWrites out JSON tokens, supports pretty and compact style output.
-
-
Constructor Summary
Constructors Constructor Description B2JsonWriter(java.io.OutputStream out, B2JsonOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinishArray()voidfinishObject()voidsetAllowNewlines(boolean allowNewlines)voidstartArray()voidstartArrayValue()voidstartObject()voidstartObjectFieldName()voidwriteFieldNameValueSeparator()voidwriteObjectFieldNameAndColon(java.lang.String name)voidwriteString(java.lang.CharSequence value)voidwriteText(java.lang.String text)
-
-
-
Constructor Detail
-
B2JsonWriter
public B2JsonWriter(java.io.OutputStream out, B2JsonOptions options)
-
-
Method Detail
-
writeText
public void writeText(java.lang.String text) throws java.io.IOException- Throws:
java.io.IOException
-
setAllowNewlines
public void setAllowNewlines(boolean allowNewlines)
-
startObject
public void startObject() throws java.io.IOException- Throws:
java.io.IOException
-
writeObjectFieldNameAndColon
public void writeObjectFieldNameAndColon(java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-
writeFieldNameValueSeparator
public void writeFieldNameValueSeparator() throws java.io.IOException- Throws:
java.io.IOException
-
startObjectFieldName
public void startObjectFieldName() throws java.io.IOException- Throws:
java.io.IOException
-
finishObject
public void finishObject() throws java.io.IOException- Throws:
java.io.IOException
-
startArray
public void startArray() throws java.io.IOException- Throws:
java.io.IOException
-
startArrayValue
public void startArrayValue() throws java.io.IOException- Throws:
java.io.IOException
-
finishArray
public void finishArray() throws java.io.IOException- Throws:
java.io.IOException
-
writeString
public void writeString(java.lang.CharSequence value) throws java.io.IOException- Throws:
java.io.IOException
-
-