ContentDescriptor
, AbstractReadHandle
, AbstractWriteHandle
, BufferableHandle
, ContentHandle<com.fasterxml.jackson.databind.JsonNode>
, CtsQueryWriteHandle
, DocumentMetadataReadHandle
, DocumentMetadataWriteHandle
, DocumentPatchHandle
, JSONReadHandle
, JSONWriteHandle
, QueryOptionsListReadHandle
, QueryOptionsReadHandle
, QueryOptionsWriteHandle
, RuleListReadHandle
, RuleReadHandle
, RuleWriteHandle
, SearchReadHandle
, SPARQLResultsReadHandle
, StructureReadHandle
, StructureWriteHandle
, TextReadHandle
, TextWriteHandle
, TriplesReadHandle
, TriplesWriteHandle
, TuplesReadHandle
, ValuesListReadHandle
, ValuesReadHandle
, XMLReadHandle
, XMLWriteHandle
, OutputStreamSender
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, CtsQueryWriteHandle, SPARQLResultsReadHandle
UNKNOWN_LENGTH
Constructor | 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 | Description |
---|---|---|
com.fasterxml.jackson.databind.JsonNode |
get() |
Returns the root node of the JSON tree.
|
protected boolean |
hasContent() |
|
static ContentHandleFactory |
newFactory() |
Creates a factory to create a JacksonHandle instance for a JSON node.
|
protected void |
receiveContent(java.io.InputStream content) |
|
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(java.io.OutputStream out) |
Implements a callback to write content to the provided output stream
for sending to the database server.
|
getByteLength, getFormat, getMimetype, getServerTimestamp, setByteLength, setFormat, setMimetype, setServerTimestamp
fromBuffer, toBuffer
getPointInTimeQueryTimestamp, isResendable, setPointInTimeQueryTimestamp, setResendable, setResponseServerTimestamp
public 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.protected void receiveContent(java.io.InputStream content)
receiveContent
in class com.marklogic.client.impl.HandleImplementation<java.io.InputStream,OutputStreamSender>
protected boolean hasContent()
hasContent
in class com.marklogic.client.impl.JacksonBaseHandle<com.fasterxml.jackson.databind.JsonNode>
public void write(java.io.OutputStream out) throws java.io.IOException
OutputStreamSender
write
in interface OutputStreamSender
write
in class com.marklogic.client.impl.JacksonBaseHandle<com.fasterxml.jackson.databind.JsonNode>
out
- the output stream receiving the contentjava.io.IOException
- if io problems ariseCopyright © 2013-2019 MarkLogic Corporation.