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 void
close()
JsonStream
put(@NotNull String key, @NotNull Object value)
JsonStream
put(String key, boolean value)
JsonStream
put(String key, double value)
JsonStream
put(String key, float value)
JsonStream
put(String key, int value)
JsonStream
put(String key, long value)
JsonStream
put(String key, com.opensymphony.webwork.dispatcher.json.JSONObject value)
JsonStream
put(String key, Collection<?> value)
JsonStream
put(String key, Map value)
JsonStream
putIfNotNull(@NotNull String key, @Nullable Object value)
void
writeArrayFieldStart(String fieldName)
void
writeEndArray()
void
writeEndObject()
void
writeStartObject()
-
-
-
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:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-