public interface ContentDescriptor
A Content Descriptor identifies the properties of some content.
| Modifier and Type | Field and Description |
|---|---|
static long |
UNKNOWN_LENGTH
Indicates that the length of the content is not known.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getByteLength()
Returns the length of the content in bytes as returned by the server.
|
Format |
getFormat()
Returns the format of the content.
|
String |
getMimetype()
Returns the mimetype of the content.
|
void |
setByteLength(long length)
Specifies the length of the content in bytes or the UNKNOWN_LENGTH constant if the length of the content is not known.
|
void |
setFormat(Format format)
Specifies the format of the content as binary, JSON, text, or XML.
|
void |
setMimetype(String mimetype)
Specifies the mimetype of the content such as application/json, text/plain, or application/xml.
|
static final long UNKNOWN_LENGTH
Indicates that the length of the content is not known.
Format getFormat()
Returns the format of the content.
void setFormat(Format format)
Specifies the format of the content as binary, JSON, text, or XML.
format - the format of the contentString getMimetype()
Returns the mimetype of the content.
void setMimetype(String mimetype)
Specifies the mimetype of the content such as application/json, text/plain, or application/xml.
mimetype - the content mimetypelong getByteLength()
Returns the length of the content in bytes as returned by the server. This value is usually not set when reading from a local source (such as a file or an input stream). The byte length won’t be returned by the server for very large documents for performance reasons. The byte length can be larger than the character length if the content contains multi-byte characters.
void setByteLength(long length)
Specifies the length of the content in bytes or the UNKNOWN_LENGTH constant if the length of the content is not known.
length - the content length in bytesCopyright © 2013-2017 MarkLogic Corporation.