Class DefaultObjectMapper
java.lang.Object
com.couchbase.client.dcp.core.utils.DefaultObjectMapper
Provides global access to the services of a Jackson
ObjectMapper
with default configuration.-
Method Summary
Modifier and TypeMethodDescriptionstatic com.couchbase.client.core.deps.com.fasterxml.jackson.databind.ObjectWriter
static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.ObjectReader
reader()
static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode
readTree
(byte[] content) static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode
readTree
(InputStream src) static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode
static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode
static <T> T
readValue
(byte[] content, int offset, int len, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
static <T> T
readValue
(byte[] content, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
static <T> T
readValue
(InputStream src, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
readValue
(InputStream src, Class<T> valueType) static <T> T
readValue
(Reader src, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
static <T> T
readValue
(String content, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
readValueAsMap
(byte[] content) readValueAsMap
(Reader src) readValueAsMap
(String content) static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.ObjectWriter
writer()
static void
writeValue
(OutputStream out, Object value) static void
writeValue
(Writer w, Object value) static byte[]
writeValueAsBytes
(Object value) static String
writeValueAsString
(Object value)
-
Method Details
-
reader
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.ObjectReader reader() -
writer
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.ObjectWriter writer() -
prettyWriter
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.ObjectWriter prettyWriter() -
writeValueAsString
public static String writeValueAsString(Object value) throws com.couchbase.client.core.deps.com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.couchbase.client.core.deps.com.fasterxml.jackson.core.JsonProcessingException
-
writeValueAsBytes
public static byte[] writeValueAsBytes(Object value) throws com.couchbase.client.core.deps.com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.couchbase.client.core.deps.com.fasterxml.jackson.core.JsonProcessingException
-
writeValue
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(String content, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(byte[] content, int offset, int len, Class<T> valueType) throws IOException - Throws:
IOException
-
readValue
public static <T> T readValue(byte[] content, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
public static <T> T readValue(byte[] content, int offset, int len, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(Reader src, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(InputStream src, com.couchbase.client.core.deps.com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readTree
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode readTree(String content) throws IOException - Throws:
IOException
-
readTree
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode readTree(byte[] content) throws IOException - Throws:
IOException
-
readTree
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode readTree(Reader src) throws IOException - Throws:
IOException
-
readTree
public static com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode readTree(InputStream src) throws IOException - Throws:
IOException
-