Package io.getstream.core.utils
Class Serialization
- java.lang.Object
-
- io.getstream.core.utils.Serialization
-
public final class Serialization extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,U>
Tconvert(U obj, com.fasterxml.jackson.core.type.TypeReference<T> type)static <T,U>
Tconvert(U obj, java.lang.Class<T> type)static <T> Tdeserialize(Response response, com.fasterxml.jackson.core.type.TypeReference<T> type)static <T> Tdeserialize(Response response, java.lang.Class<T> type)static <T> Tdeserialize(Response response, java.lang.String wrapper, java.lang.Class<T> type)static <T> TdeserializeContainer(Response response, java.lang.Class<?> wrapperType, java.lang.Class<?>... types)static <T> java.util.List<T>deserializeContainer(Response response, java.lang.Class<T> type)static <T> TdeserializeContainer(Response response, java.lang.String wrapper, com.fasterxml.jackson.databind.JavaType element)static <T> java.util.List<T>deserializeContainer(Response response, java.lang.String wrapper, java.lang.Class<T> element)static <T> TdeserializeContainerSingleItem(Response response, java.lang.Class<T> element)static java.lang.VoiddeserializeError(Response response)static <T> TfromJSON(java.io.InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> type)static <T> TfromJSON(java.io.InputStream json, java.lang.Class<T> type)static <T> TfromJSON(java.io.InputStream json, java.lang.String wrapper, com.fasterxml.jackson.databind.JavaType type)static <T> TfromJSON(java.lang.String json, java.lang.Class<T> type)static <T> java.util.List<T>fromJSONList(java.lang.String json, java.lang.Class<T> type)com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)static <T> byte[]toJSON(T obj)
-
-
-
Method Detail
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
toJSON
public static <T> byte[] toJSON(T obj) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
fromJSON
public static <T> T fromJSON(java.io.InputStream json, java.lang.Class<T> type) throws java.io.IOException- Throws:
java.io.IOException
-
fromJSON
public static <T> T fromJSON(java.io.InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> type) throws java.io.IOException- Throws:
java.io.IOException
-
fromJSON
public static <T> T fromJSON(java.io.InputStream json, java.lang.String wrapper, com.fasterxml.jackson.databind.JavaType type) throws java.io.IOException- Throws:
java.io.IOException
-
fromJSON
public static <T> T fromJSON(java.lang.String json, java.lang.Class<T> type) throws java.io.IOException- Throws:
java.io.IOException
-
fromJSONList
public static <T> java.util.List<T> fromJSONList(java.lang.String json, java.lang.Class<T> type) throws java.io.IOException- Throws:
java.io.IOException
-
convert
public static <T,U> T convert(U obj, java.lang.Class<T> type)
-
convert
public static <T,U> T convert(U obj, com.fasterxml.jackson.core.type.TypeReference<T> type)
-
deserializeContainer
public static <T> java.util.List<T> deserializeContainer(Response response, java.lang.Class<T> type) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserializeContainer
public static <T> T deserializeContainer(Response response, java.lang.Class<?> wrapperType, java.lang.Class<?>... types) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserializeContainer
public static <T> java.util.List<T> deserializeContainer(Response response, java.lang.String wrapper, java.lang.Class<T> element) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserializeContainerSingleItem
public static <T> T deserializeContainerSingleItem(Response response, java.lang.Class<T> element) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserializeContainer
public static <T> T deserializeContainer(Response response, java.lang.String wrapper, com.fasterxml.jackson.databind.JavaType element) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserialize
public static <T> T deserialize(Response response, java.lang.String wrapper, java.lang.Class<T> type) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserialize
public static <T> T deserialize(Response response, java.lang.Class<T> type) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserialize
public static <T> T deserialize(Response response, com.fasterxml.jackson.core.type.TypeReference<T> type) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
deserializeError
public static java.lang.Void deserializeError(Response response) throws java.io.IOException, StreamException
- Throws:
java.io.IOExceptionStreamException
-
-