public class TemporaryStore extends Object implements Store<InputStream>
| Modifier and Type | Field and Description |
|---|---|
static String |
FILENAME_PREFIX |
static String |
FILENAME_SUFFIX |
| Constructor and Description |
|---|
TemporaryStore(File folder,
boolean flushStoreage) |
| Modifier and Type | Method and Description |
|---|---|
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)
|
public static final String FILENAME_PREFIX
public static final String FILENAME_SUFFIX
public TemporaryStore(File folder, boolean flushStoreage)
public Handle store(InputStream inp) throws IOException
Storestore in interface Store<InputStream>inp - object to be stored. Implementations are usually bound to a certain TIOException - in case incoming object cannot be read (if it involves IO)public InputStream load(Handle handle) throws IOException
Storeload 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
StoregetLocation 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
IOExceptionCopyright © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.