|
ModeShape Distribution 3.2.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.value.binary.AbstractBinary
org.modeshape.jcr.value.binary.ExternalBinaryValue
public abstract class ExternalBinaryValue
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 binaries
Field Summary |
---|
Fields inherited from class org.modeshape.jcr.value.binary.AbstractBinary |
---|
EMPTY_CONTENT |
Constructor Summary | |
---|---|
protected |
ExternalBinaryValue(BinaryKey key,
String sourceName,
String id,
long size,
String nameHint,
MimeTypeDetector mimeTypeDetector)
Creates a new instance, with the given params |
protected |
ExternalBinaryValue(String sha1,
String sourceName,
String id,
long size,
String nameHint,
MimeTypeDetector mimeTypeDetector)
Creates a new instance, with the given params |
Method Summary | |
---|---|
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()
|
Methods inherited from class org.modeshape.jcr.value.binary.AbstractBinary |
---|
compareTo, dispose, equals, getHash, getHexHash, getKey, getReadableSize, hashCode, keyFor, read |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jcr.Binary |
---|
getStream |
Constructor Detail |
---|
protected ExternalBinaryValue(String sha1, String sourceName, String id, long size, String nameHint, MimeTypeDetector mimeTypeDetector)
sha1
- the SHA-1 of the binary, never null
sourceName
- name of the external source which owns the value, never null
id
- the source-specific identifier of the binary, never null
size
- the length of the binarynameHint
- optional name which can help with mime-type detectionmimeTypeDetector
- the repository's MimeTypeDetector
protected ExternalBinaryValue(BinaryKey key, String sourceName, String id, long size, String nameHint, MimeTypeDetector mimeTypeDetector)
key
- the binary key, never null
sourceName
- name of the external source which owns the value, never null
id
- the source-specific identifier of the binary, never null
size
- the length of the binarynameHint
- optional name which can help with mime-type detectionmimeTypeDetector
- the repository's MimeTypeDetector
Method Detail |
---|
public String getId()
public String getSourceName()
protected void setMimeType(String mimeType)
protected boolean hasMimeType()
public String getMimeType()
public String getMimeType(String name)
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 AbstractBinary
|
ModeShape Distribution 3.2.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |