public interface XdmItem extends XdmValue
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
asInputStream()
Return a java.io.InputStream for this
item.
|
java.io.Reader |
asReader()
Return a java.io.Reader for this item.
|
ItemType |
getItemType()
The
ItemType
instance corresponding to the type of this item. |
boolean |
isCached()
Indicates whether this item's value is buffered
in memory.
|
void |
writeTo(java.io.OutputStream outputStream)
Write the value of this item to the provided
OutputStream object. |
void |
writeTo(java.io.Writer writer)
Write the value of this item to the provided
Writer object. |
asString,
getValueTypeItemType getItemType()
ItemType
instance corresponding to the type of this item.ItemType that
represent the XML Schema type of this value.java.io.Reader asReader()
XdmValue.asString().java.lang.UnsupportedOperationException - If the
underlying value object cannot be represented as a character
stream.java.io.InputStream asInputStream()
java.lang.UnsupportedOperationException - If the
underlying value object cannot be represented as a byte
stream.
void writeTo(java.io.Writer writer)
throws java.io.IOException
Writer object. The Reader returned by the
method
asReader() will be used as the value source.writer - A client-provided, open
Writer object to which the value will be written. The
Writer will not be closed by this method.java.io.IOException
void writeTo(java.io.OutputStream outputStream)
throws java.io.IOException
OutputStream object. The InputStream
returned by the method
asInputStream() will be as the value source.outputStream - A Client-provided, open
OutputStream object to which the value will be
written. The OutputStream will not be closed by this
method.java.io.IOExceptionboolean isCached()
Indicates whether this item's value is buffered in memory. If so
it is safe to call any of the accessor methods (XdmValue.asString(),
asInputStream() or
asReader()) and to call them repeatedly.
Normally this method will only return false for ResultItem
instances which are members of a streaming ResultSequences.
However, even such instances may be indicate thstt they are cached
if, for example,
XdmValue.asString() is the first method invoked. Doing
so will buffer the value which can then be reused for subsequent
invocations of
asReader() or
asInputStream().
Copyright © 2025 MarkLogic
Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server,
XQuery and related components may
be found at
developer.marklogic.com