Package com.atlassian.bamboo.struts
Class JsonStream
- java.lang.Object
-
- com.atlassian.bamboo.struts.JsonStream
-
- All Implemented Interfaces:
AutoCloseable
public class JsonStream extends Object implements AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description JsonStream(Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()JsonStreamput(@NotNull String key, @NotNull Object value)JsonStreamput(String key, boolean value)JsonStreamput(String key, double value)JsonStreamput(String key, float value)JsonStreamput(String key, int value)JsonStreamput(String key, long value)JsonStreamput(String key, com.opensymphony.webwork.dispatcher.json.JSONObject value)JsonStreamput(String key, Collection<?> value)JsonStreamput(String key, Map value)JsonStreamputIfNotNull(@NotNull String key, @Nullable Object value)voidwriteArrayFieldStart(String fieldName)voidwriteEndArray()voidwriteEndObject()voidwriteStartObject()
-
-
-
Constructor Detail
-
JsonStream
public JsonStream(Writer writer) throws IOException
- Throws:
IOException
-
-
Method Detail
-
writeArrayFieldStart
public void writeArrayFieldStart(String fieldName) throws IOException
- Throws:
IOException
-
writeStartObject
public void writeStartObject() throws IOException- Throws:
IOException
-
writeEndObject
public void writeEndObject() throws IOException- Throws:
IOException
-
writeEndArray
public void writeEndArray() throws IOException- Throws:
IOException
-
put
public JsonStream put(String key, boolean value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, int value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, long value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, float value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, double value) throws IOException
- Throws:
IOException
-
putIfNotNull
public JsonStream putIfNotNull(@NotNull @NotNull String key, @Nullable @Nullable Object value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(@NotNull @NotNull String key, @NotNull @NotNull Object value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, com.opensymphony.webwork.dispatcher.json.JSONObject value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, Collection<?> value) throws IOException
- Throws:
IOException
-
put
public JsonStream put(String key, Map value) throws IOException
- Throws:
IOException
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-