public class XQueryTypeHandle<T> extends BaseHandle<InputStream,OutputStreamSender> implements OutputStreamSender, BufferableHandle, ContentHandle<T>, XMLReadHandle, XMLWriteHandle
UNKNOWN_LENGTH| Constructor and Description |
|---|
XQueryTypeHandle(Class<T> clazz) |
XQueryTypeHandle(QName xsType,
T content)
Initializes the handle with the 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.
|
T |
get()
Returns the DOM Node for the content.
|
static ContentHandleFactory |
newFactory()
Creates a factory to create a DOMHandle instance for a DOM document.
|
void |
set(T content)
Assigns a DOM Node document as the content.
|
byte[] |
toBuffer()
Copies the content of the handle to a byte array buffer
encoded in UTF-8.
|
String |
toString()
Returns the DOM Node as a string.
|
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, setFormat, setMimetypepublic static ContentHandleFactory newFactory()
public T get()
get in interface ContentHandle<T>public void set(T content)
set in interface ContentHandle<T>content - a DOM Nodepublic void fromBuffer(byte[] buffer)
BufferableHandlefromBuffer in interface BufferableHandlebuffer - the byte arraypublic byte[] toBuffer()
BufferableHandletoBuffer in interface BufferableHandlepublic String toString()
public void write(OutputStream out) throws IOException
OutputStreamSenderwrite in interface OutputStreamSenderout - the output stream receiving the contentIOExceptionCopyright © 2013-2015 MarkLogic Corporation.