public class JDOMHandle extends BaseHandle<InputStream,OutputStreamSender> implements OutputStreamSender, BufferableHandle, XMLReadHandle, XMLWriteHandle, StructureReadHandle, StructureWriteHandle
UNKNOWN_LENGTH| Constructor and Description |
|---|
JDOMHandle() |
JDOMHandle(org.jdom2.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.jdom2.Document |
get() |
org.jdom2.input.SAXBuilder |
getBuilder() |
org.jdom2.output.XMLOutputter |
getOutputter() |
void |
set(org.jdom2.Document content) |
void |
setBuilder(org.jdom2.input.SAXBuilder builder) |
void |
setFormat(Format format)
Specifies the format of the content as binary, JSON, text, or XML.
|
void |
setOutputter(org.jdom2.output.XMLOutputter outputter) |
byte[] |
toBuffer()
Copies the content of the handle to a byte array buffer
encoded in UTF-8.
|
String |
toString() |
JDOMHandle |
with(org.jdom2.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 JDOMHandle()
public JDOMHandle(org.jdom2.Document content)
public org.jdom2.input.SAXBuilder getBuilder()
public void setBuilder(org.jdom2.input.SAXBuilder builder)
public org.jdom2.output.XMLOutputter getOutputter()
public void setOutputter(org.jdom2.output.XMLOutputter outputter)
public org.jdom2.Document get()
public void set(org.jdom2.Document content)
public JDOMHandle with(org.jdom2.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.