public class XOMHandle extends BaseHandle<InputStream,OutputStreamSender> implements OutputStreamSender, BufferableHandle, XMLReadHandle, XMLWriteHandle, StructureReadHandle, StructureWriteHandle
UNKNOWN_LENGTH| Constructor and Description |
|---|
XOMHandle() |
XOMHandle(nu.xom.Document 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.
|
nu.xom.Document |
get() |
nu.xom.Builder |
getBuilder() |
void |
set(nu.xom.Document content) |
void |
setBuilder(nu.xom.Builder builder) |
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() |
XOMHandle |
with(nu.xom.Document 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 nu.xom.Builder getBuilder()
public void setBuilder(nu.xom.Builder builder)
public nu.xom.Document get()
public void set(nu.xom.Document content)
public XOMHandle with(nu.xom.Document 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.