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) |
createContent
createDocument,
getCollections,
getFragmentOrdinal,
getMetadata,
getQuality,
setContentOptions,
setQuality
public 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 MarkLogicDocument
readFields
in
interface org.apache.hadoop.io.Writable
readFields
in class ForestDocument
IOException
public void write(DataOutput out) throws IOException
write
in interface MarkLogicDocument
write
in
interface org.apache.hadoop.io.Writable
write
in class ForestDocument
IOException
public byte[] getContentAsByteArray()
MarkLogicDocument
public byte[] getContentAsByteArray(int offset, int len)
public MarkLogicNode getContentAsMarkLogicNode()
MarkLogicDocument
public org.apache.hadoop.io.Text getContentAsText()
MarkLogicDocument
public ContentType getContentType()
MarkLogicDocument
public String getContentAsString() throws UnsupportedEncodingException
MarkLogicDocument
UnsupportedEncodingException
public InputStream getContentAsByteStream()
MarkLogicDocument
getContentAsByteStream
in
interface MarkLogicDocument
getContentAsByteStream
in class ForestDocument
public long getContentSize()
MarkLogicDocument
getContentSize
in interface MarkLogicDocument
getContentSize
in class ForestDocument
public boolean isStreamable()
MarkLogicDocument
isStreamable
in interface MarkLogicDocument
isStreamable
in class ForestDocument
Copyright © 2020 MarkLogic
Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server,
XQuery and related components may be found at
developer.marklogic.com