com.marklogic.xcc.types
Interface XdmBinary
- All Superinterfaces:
- XdmItem, XdmNode, XdmValue
- public interface XdmBinary
- extends XdmNode
An XDM-like binary() value (binary() is a Mark Logic extension).
|
Method Summary |
byte[] |
asBinaryData()
Buffers the binary() item from the server and converts it
to a Java byte array. |
asBinaryData
public byte[] asBinaryData()
- Buffers the binary() item from the server and converts it
to a Java byte array. This method may be invoked
repeatedly. On subsequent invocations it will return
the same array constructed by the first invocation.
NOTE: If the binary() item is large, it
is possible that an OutOfMemory error could result when
invoking this method, which could result in your program
crashing. If you need to handle arbitrarily large binary()
items, use the XdmItem.asInputStream() method.
- Returns:
- This item as a Java byte array.
- Throws:
IllegalStateException - If called after the
InputStream has already been consumed.- See Also:
XdmItem.asInputStream(),
XdmItem.isCached()
Copyright © 2003-2008 Mark Logic Corporation, All Rights Reserved.
Complete online documentation for MarkLogic Server,
XQuery and related components may be found at
developer.marklogic.com