Package com.clickhouse.client.data
Class JsonStreamUtils
- java.lang.Object
-
- com.clickhouse.client.data.JsonStreamUtils
-
public final class JsonStreamUtils extends Object
Utility class for reading and writing objects in JSON format.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TreadObject(InputStream input, Class<T> clazz)static <T> TreadObject(InputStream input, Charset charset, Class<T> clazz)static <T> TreadObject(Reader reader, Class<T> clazz)static <T> TreadObject(String json, Class<T> clazz)static StringtoJsonString(Object object)static <T> voidwriteObject(OutputStream output, Charset charset, T object)static <T> voidwriteObject(OutputStream output, T object)static <T> voidwriteObject(Writer writer, T object)
-
-
-
Method Detail
-
readObject
public static <T> T readObject(InputStream input, Class<T> clazz) throws IOException
- Throws:
IOException
-
readObject
public static <T> T readObject(InputStream input, Charset charset, Class<T> clazz) throws IOException
- Throws:
IOException
-
readObject
public static <T> T readObject(Reader reader, Class<T> clazz) throws IOException
- Throws:
IOException
-
readObject
public static <T> T readObject(String json, Class<T> clazz) throws IOException
- Throws:
IOException
-
writeObject
public static <T> void writeObject(OutputStream output, T object) throws IOException
- Throws:
IOException
-
writeObject
public static <T> void writeObject(OutputStream output, Charset charset, T object) throws IOException
- Throws:
IOException
-
writeObject
public static <T> void writeObject(Writer writer, T object) throws IOException
- Throws:
IOException
-
-