|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.JcrBinary
public class JcrBinary
An implementation of JCR 2.0 Binary that wraps a graph Binary
value object.
Method Summary | |
---|---|
Binary |
binary()
|
void |
dispose()
|
byte[] |
getHash()
Get the SHA-1 hash of the contents. |
String |
getHexHash()
Get the hexadecimal form of the SHA-1 hash of the contents. |
long |
getSize()
|
InputStream |
getStream()
|
int |
read(byte[] b,
long position)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Binary binary()
public byte[] getHash()
Binary
Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
MessageDigest.digest(byte[])
,
MessageDigest.getInstance(String)
,
Binary.getHexHash()
public String getHexHash()
Binary
Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
Binary.getHash()
, or a null string if the hash could not be computed or is not knownMessageDigest.digest(byte[])
,
MessageDigest.getInstance(String)
,
Binary.getHash()
public void dispose()
dispose
in interface Binary
Binary.dispose()
public long getSize()
getSize
in interface Binary
Binary.getSize()
public InputStream getStream()
getStream
in interface Binary
Binary.getStream()
public int read(byte[] b, long position) throws IOException
read
in interface Binary
IOException
Binary.read(byte[], long)
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |