|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ops4j.store.intern.TemporaryStore
public class TemporaryStore
Entity store like implementation. Stores incoming data (store) to disk at a temporary location. The handle is valid for use (load) only for this instance's lifetime. (tmp storage location) Uses an SHA-1 hash for indexing.
| Constructor Summary | |
|---|---|
TemporaryStore(File folder,
boolean flushStoreage)
|
|
| Method Summary | |
|---|---|
URI |
getLocation(Handle handle)
Fixed location for a resource that has been stored before. |
String |
hash(InputStream is,
OutputStream storeHere)
|
InputStream |
load(Handle handle)
Load a T after (successfully) stored it before. |
Handle |
store(InputStream inp)
Read incoming object of type T (for example an InputSteam) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemporaryStore(File folder,
boolean flushStoreage)
| Method Detail |
|---|
public Handle store(InputStream inp)
throws IOException
Store
store in interface Store<InputStream>inp - object to be stored. Implementations are usually bound to a certain T
IOException - in case incoming object cannot be read (if it involves IO)
public InputStream load(Handle handle)
throws IOException
Store
load in interface Store<InputStream>handle - identifier that has been returned from a previous srore call.
IOException - if loading resource involves IO, things can always go wrong.
public URI getLocation(Handle handle)
throws IOException
Store
getLocation in interface Store<InputStream>handle - must refer to a previously stored object.
IOException - if IO is involved, things may go mad.
public String hash(InputStream is,
OutputStream storeHere)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||