public class LargeBinaryDocument extends BinaryDocument
BinaryDocument representing a large binary document
extracted from a forest using Direct Access.
A large binary is stored outside of a MarkLogic fragment. A binary document categorized as "large" when it exceeds the large size threshold configured for a database. For more details, see "Working With Binary Documents" in the MarkLogic Server Application Developer's Guide.
ForestInputFormat| Modifier and Type | Field and Description |
|---|---|
protected long |
binaryOrigLen |
protected org.apache.hadoop.conf.Configuration |
conf |
static org.apache.commons.logging.Log |
LOG |
protected long |
offset |
protected org.apache.hadoop.fs.Path |
path |
protected long |
size |
| Constructor and Description |
|---|
LargeBinaryDocument() |
LargeBinaryDocument(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path forestDir,
ExpandedTree tree) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBinaryOrigLen() |
byte[] |
getContentAsByteArray()
Return content as byte array.
|
byte[] |
getContentAsByteArray(int offset,
int len) |
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.
|
long |
getOffset() |
org.apache.hadoop.fs.Path |
getPath() |
boolean |
isStreamable()
Whether the content can be streamed.
|
void |
readFields(DataInput in) |
void |
write(DataOutput out) |
createContentcreateDocument, getCollections, getFragmentOrdinal, getMetadata, getQuality, setContentOptions, setQualitypublic static final org.apache.commons.logging.Log LOG
protected org.apache.hadoop.fs.Path path
protected long offset
protected long size
protected long binaryOrigLen
protected org.apache.hadoop.conf.Configuration conf
public LargeBinaryDocument()
public LargeBinaryDocument(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path forestDir,
ExpandedTree tree)
public org.apache.hadoop.fs.Path getPath()
public long getOffset()
public long getBinaryOrigLen()
public void readFields(DataInput in) throws IOException
readFields in interface MarkLogicDocumentreadFields in interface org.apache.hadoop.io.WritablereadFields in class ForestDocumentIOExceptionpublic void write(DataOutput out) throws IOException
write in interface MarkLogicDocumentwrite in interface org.apache.hadoop.io.Writablewrite in class ForestDocumentIOExceptionpublic byte[] getContentAsByteArray()
MarkLogicDocumentpublic byte[] getContentAsByteArray(int offset,
int len)
public MarkLogicNode getContentAsMarkLogicNode()
MarkLogicDocumentpublic org.apache.hadoop.io.Text getContentAsText()
MarkLogicDocumentpublic ContentType getContentType()
MarkLogicDocumentpublic String getContentAsString() throws UnsupportedEncodingException
MarkLogicDocumentUnsupportedEncodingExceptionpublic InputStream getContentAsByteStream()
MarkLogicDocumentgetContentAsByteStream in interface MarkLogicDocumentgetContentAsByteStream in class ForestDocumentpublic long getContentSize()
MarkLogicDocumentgetContentSize in interface MarkLogicDocumentgetContentSize in class ForestDocumentpublic boolean isStreamable()
MarkLogicDocumentisStreamable in interface MarkLogicDocumentisStreamable in class ForestDocumentCopyright © 2023 MarkLogic Corporation
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com