|
ModeShape Distribution 3.0.0.CR3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Binary
An extension of the standard Binary interface, with methods to obtain the SHA-1 hash of the binary value.
| Method Summary | |
|---|---|
byte[] |
getHash()
Get the SHA-1 hash of the contents. |
String |
getHexHash()
Get the hexadecimal form of the SHA-1 hash of the contents. |
String |
getMimeType()
Get the MIME type for this binary value. |
String |
getMimeType(String name)
Get the MIME type for this binary value. |
| Methods inherited from interface javax.jcr.Binary |
|---|
dispose, getSize, getStream, read |
| Method Detail |
|---|
byte[] getHash()
Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
MessageDigest.digest(byte[]),
MessageDigest.getInstance(String),
getHexHash()String getHexHash()
Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
getHash(), or a null string if the hash could not be computed or is not knownMessageDigest.digest(byte[]),
MessageDigest.getInstance(String),
getHash()
String getMimeType()
throws IOException,
RepositoryException
IOException - if there is a problem reading the binary content
RepositoryException - if an error occurs.
String getMimeType(String name)
throws IOException,
RepositoryException
name - the name of the binary value, useful in helping to determine the MIME type
IOException - if there is a problem reading the binary content
RepositoryException - if an error occurs.
|
ModeShape Distribution 3.0.0.CR3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||