public abstract class ExternalBinaryValue extends AbstractBinary
BinaryValue implementation that represents a binary value that resides outside of ModeShape's
binary store. Typically this will be subclasses by Connector implementations that wish to provide their own binariesEMPTY_CONTENT| Modifier | Constructor and Description |
|---|---|
protected |
ExternalBinaryValue(BinaryKey key,
String sourceName,
String id,
long size,
String nameHint,
MimeTypeDetector mimeTypeDetector)
Creates a new instance, with the given params
|
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Returns this binary's source-specific identifier.
|
String |
getMimeType() |
String |
getMimeType(String name) |
long |
getSize()
Get the length of this binary data.
|
String |
getSourceName()
Returns the name of the external source, to which this binary belongs.
|
protected boolean |
hasMimeType() |
protected void |
setMimeType(String mimeType) |
String |
toString() |
compareTo, dispose, equals, getHash, getHexHash, getKey, getReadableSize, hashCode, keyFor, readprotected ExternalBinaryValue(BinaryKey key, String sourceName, String id, long size, String nameHint, MimeTypeDetector mimeTypeDetector)
key - the binary key, never nullsourceName - name of the external source which owns the value, never nullid - the source-specific identifier of the binary, never nullsize - the length of the binarynameHint - optional name which can help with mime-type detectionmimeTypeDetector - the repository's MimeTypeDetectorpublic String getId()
public String getSourceName()
protected void setMimeType(String mimeType)
protected boolean hasMimeType()
public String getMimeType()
public long getSize()
BinaryValue
Note that this method, unlike the standard Binary.getSize() method, does not throw an exception.
public String toString()
toString in class AbstractBinaryCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.