|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.graph.properties.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. |
int |
compareTo(Binary o)
|
boolean |
equals(Object obj)
|
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. |
void |
release()
Release any acquired resources. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InMemoryBinary(byte[] bytes)
| Method Detail |
|---|
public long getSize()
getSize in interface BinaryBinary.acquire()public byte[] getHash()
Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
getHash in interface BinaryBinary.getHash()public byte[] getBytes()
getBytes in interface BinaryBinary.acquire()public InputStream getStream()
getStream in interface BinaryBinary.acquire()public void acquire()
acquire in interface BinaryBinary.release()public void release()
release in interface BinaryBinary.acquire()public int compareTo(Binary o)
compareTo in interface Comparable<Binary>public boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||