|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.graph.property.basic.AbstractBinary
org.jboss.dna.graph.property.basic.InMemoryBinary
@Immutable public class InMemoryBinary

An implementation of Binary that keeps the binary data in-memory.
| Constructor Summary | |
|---|---|
InMemoryBinary(byte[] bytes)
|
|
| Method Summary | |
|---|---|
void |
acquire()
Acquire any resources for this data. |
byte[] |
getBytes()
Get the contents of this data as a byte array. |
byte[] |
getHash()
Get the SHA-1 hash of the contents. |
long |
getSize()
Get the length of this binary data. |
InputStream |
getStream()
Get the contents of this data as a stream. |
int |
hashCode()
|
void |
release()
Release any acquired resources. |
| Methods inherited from class org.jboss.dna.graph.property.basic.AbstractBinary |
|---|
compareTo, equals, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InMemoryBinary(byte[] bytes)
| Method Detail |
|---|
public int hashCode()
hashCode in class ObjectObject.hashCode()public long getSize()
Binary.acquire()public byte[] getHash()
Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
Binary.getHash()public byte[] getBytes()
Binary.acquire()public InputStream getStream()
Binary.acquire()public void acquire()
Binary.release()public void release()
Binary.acquire()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||