public class JacksonHandle extends com.marklogic.client.impl.JacksonBaseHandle<com.fasterxml.jackson.databind.JsonNode> implements ContentHandle<com.fasterxml.jackson.databind.JsonNode>, OutputStreamSender, BufferableHandle, JSONReadHandle, JSONWriteHandle, TextReadHandle, TextWriteHandle, XMLReadHandle, XMLWriteHandle, StructureReadHandle, StructureWriteHandle, SPARQLResultsReadHandle
UNKNOWN_LENGTH| Constructor and Description |
|---|
JacksonHandle()
Zero-argument constructor.
|
JacksonHandle(com.fasterxml.jackson.databind.JsonNode content)
Provides a handle on JSON content as a Jackson tree.
|
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
get()
Returns the root node of the JSON tree.
|
static ContentHandleFactory |
newFactory()
Creates a factory to create a JacksonHandle instance for a JSON node.
|
void |
set(com.fasterxml.jackson.databind.JsonNode content)
Assigns a JSON tree as the content.
|
JacksonHandle |
with(com.fasterxml.jackson.databind.JsonNode content)
Assigns a JSON tree as the content and returns the handle.
|
JacksonHandle |
withFormat(Format format)
Specifies the format of the content and returns the handle
as a fluent convenience.
|
void |
write(OutputStream out)
Implements a callback to write content to the provided output stream
for sending to the database server.
|
fromBuffer, getMapper, setMapper, toBuffer, toStringgetByteLength, getFormat, getMimetype, setByteLength, setFormat, setMimetypeequals, getClass, hashCode, notify, notifyAll, wait, wait, waitfromBuffer, toBufferpublic JacksonHandle()
public JacksonHandle(com.fasterxml.jackson.databind.JsonNode content)
content - the JSON root node of the tree.public static ContentHandleFactory newFactory()
public JacksonHandle withFormat(Format format)
format - the format of the contentpublic com.fasterxml.jackson.databind.JsonNode get()
get in interface ContentHandle<com.fasterxml.jackson.databind.JsonNode>public void set(com.fasterxml.jackson.databind.JsonNode content)
set in interface ContentHandle<com.fasterxml.jackson.databind.JsonNode>set in class com.marklogic.client.impl.JacksonBaseHandle<com.fasterxml.jackson.databind.JsonNode>content - the JSON root node.public JacksonHandle with(com.fasterxml.jackson.databind.JsonNode content)
content - the JSON root node.public void write(OutputStream out) throws IOException
OutputStreamSenderwrite in interface OutputStreamSenderwrite in class com.marklogic.client.impl.JacksonBaseHandle<com.fasterxml.jackson.databind.JsonNode>out - the output stream receiving the contentIOException - if io problems ariseCopyright © 2013-2016 MarkLogic Corporation.