|
XCC/J 3.2-9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Base class for XQuery item values (values that may be a member of a sequence).
| Method Summary | |
InputStream |
asInputStream()
Return a java.io.InputStream for this item. |
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(OutputStream outputStream)
Write the value of this item to the provided OutputStream object. |
void |
writeTo(Writer writer)
Write the value of this item to the provided Writer object. |
| Methods inherited from interface com.marklogic.xcc.types.XdmValue |
asString, getValueType |
| Method Detail |
public ItemType getItemType()
ItemType instance corresponding to
the type of this item.
ItemType that
represent the XML Schema type of this value.public Reader asReader()
XdmValue.asString().
UnsupportedOperationException - If the
underlying value object cannot be represented
as a character stream.public InputStream asInputStream()
UnsupportedOperationException - If the
underlying value object cannot be represented
as a byte stream.
public void writeTo(Writer writer)
throws 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.
IOException
public void writeTo(OutputStream outputStream)
throws 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.
IOExceptionpublic boolean 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().
|
XCC/J 3.2-9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com