public interface MarkLogicDocument
extends org.apache.hadoop.io.Writable
This interface represents any type of MarkLogic document, regardless of content type or whether it is actively managed by MarkLogic server.
Modifier and Type | Method and Description |
---|---|
byte[] |
getContentAsByteArray()
Return content as byte array.
|
InputStream |
getContentAsByteStream()
Return content as byte stream.
|
MarkLogicNode |
getContentAsMarkLogicNode()
Return content as MarkLogicNode.
|
String |
getContentAsString()
Return content as String.
|
org.apache.hadoop.io.Text |
getContentAsText()
Return content as Text.
|
long |
getContentSize()
Return byte length of the content.
|
ContentType |
getContentType()
Return content type of the document.
|
boolean |
isStreamable()
Whether the content can be streamed.
|
void |
readFields(DataInput in) |
void |
write(DataOutput out) |
ContentType getContentType()
org.apache.hadoop.io.Text getContentAsText()
UnsupportedOperationException
- for binary documents.byte[] getContentAsByteArray()
InputStream getContentAsByteStream()
MarkLogicNode getContentAsMarkLogicNode()
UnsupportedOperationException
- for binary documents.String getContentAsString() throws UnsupportedEncodingException
UnsupportedEncodingException
UnsupportedOperationException
- for binary documents.long getContentSize()
boolean isStreamable()
void readFields(DataInput in) throws IOException
readFields
in
interface org.apache.hadoop.io.Writable
IOException
void write(DataOutput out) throws IOException
write
in
interface org.apache.hadoop.io.Writable
IOException
Copyright © 2020 MarkLogic
Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server,
XQuery and related components may be found at
developer.marklogic.com