public class JacksonHandle extends BaseHandle<InputStream,OutputStreamSender> implements OutputStreamSender, BufferableHandle, JSONReadHandle, JSONWriteHandle, StructureReadHandle, StructureWriteHandle
UNKNOWN_LENGTH| Constructor and Description |
|---|
JacksonHandle() |
JacksonHandle(com.fasterxml.jackson.databind.JsonNode content) |
| Modifier and Type | Method and Description |
|---|---|
void |
fromBuffer(byte[] buffer)
Sets the content of the handle by copying from a byte array buffer
encoded in UTF-8.
|
com.fasterxml.jackson.databind.JsonNode |
get() |
com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
void |
set(com.fasterxml.jackson.databind.JsonNode content) |
void |
setFormat(Format format)
Specifies the format of the content as binary, JSON, text, or XML.
|
byte[] |
toBuffer()
Copies the content of the handle to a byte array buffer
encoded in UTF-8.
|
String |
toString() |
JacksonHandle |
with(com.fasterxml.jackson.databind.JsonNode content) |
void |
write(OutputStream out)
Implements a callback to write content to the provided output stream
for sending to the database server.
|
getByteLength, getFormat, getMimetype, setByteLength, setMimetypepublic JacksonHandle()
public JacksonHandle(com.fasterxml.jackson.databind.JsonNode content)
public com.fasterxml.jackson.databind.ObjectMapper getMapper()
public com.fasterxml.jackson.databind.JsonNode get()
public void set(com.fasterxml.jackson.databind.JsonNode content)
public JacksonHandle with(com.fasterxml.jackson.databind.JsonNode content)
public void setFormat(Format format)
ContentDescriptorsetFormat in interface ContentDescriptorsetFormat in class BaseHandle<InputStream,OutputStreamSender>format - the format of the contentpublic void fromBuffer(byte[] buffer)
BufferableHandlefromBuffer in interface BufferableHandlebuffer - the byte arraypublic byte[] toBuffer()
BufferableHandletoBuffer in interface BufferableHandlepublic void write(OutputStream out) throws IOException
OutputStreamSenderwrite in interface OutputStreamSenderout - the output stream receiving the contentIOExceptionCopyright © 2013-2014 MarkLogic Corporation.