public class DOM4JHandle extends BaseHandle<InputStream,OutputStreamSender> implements OutputStreamSender, BufferableHandle, XMLReadHandle, XMLWriteHandle, StructureReadHandle, StructureWriteHandle
UNKNOWN_LENGTH| Constructor and Description |
|---|
DOM4JHandle() |
DOM4JHandle(org.dom4j.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.
|
org.dom4j.Document |
get() |
org.dom4j.io.OutputFormat |
getOutputFormat() |
org.dom4j.io.SAXReader |
getReader() |
void |
set(org.dom4j.Document content) |
void |
setFormat(Format format)
Specifies the format of the content as binary, JSON, text, or XML.
|
void |
setOutputFormat(org.dom4j.io.OutputFormat outputFormat) |
void |
setReader(org.dom4j.io.SAXReader reader) |
byte[] |
toBuffer()
Copies the content of the handle to a byte array buffer
encoded in UTF-8.
|
String |
toString() |
DOM4JHandle |
with(org.dom4j.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 DOM4JHandle()
public DOM4JHandle(org.dom4j.Document content)
public org.dom4j.Document get()
public void set(org.dom4j.Document content)
public DOM4JHandle with(org.dom4j.Document content)
public void setFormat(Format format)
ContentDescriptorsetFormat in interface ContentDescriptorsetFormat in class BaseHandle<InputStream,OutputStreamSender>format - the format of the contentpublic org.dom4j.io.SAXReader getReader()
public void setReader(org.dom4j.io.SAXReader reader)
public org.dom4j.io.OutputFormat getOutputFormat()
public void setOutputFormat(org.dom4j.io.OutputFormat outputFormat)
public 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.