|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ISource
A ISource is any type of persistant storage that can have
content in binary format streamed into it and associated with a unique key,
then stream the same binary content back from the same key.
| Method Summary | |
|---|---|
void |
close()
Called when a source is no longer to be used and provides a chance for clean up and release of resources. |
InputStream |
getInputStream(String key)
Returns a stream to read the content specified by the key,
or null if no content is associated with the
key. |
Set<String> |
getKeys()
Returns a Set of all current keys in this source, or an
empty Set if there are none. |
OutputStream |
getOutputStream(String key)
Returns a stream to write the content associated with the key. |
boolean |
remove(String key)
Returns true if the content mapped to the provided
key was removed, false if no content is
associated with the key. |
| Method Detail |
|---|
void close()
throws IOException
IOException - if there is a problem during closing.
Set<String> getKeys()
throws IOException
Set of all current keys in this source, or an
empty Set if there are none.
Set of all current keys in this source, or an
empty Set if there are none.
IOException - if there is a problem reading the keys.
boolean remove(String key)
throws IOException
true if the content mapped to the provided
key was removed, false if no content is
associated with the key.
key - unique value associated with the content.
true if the content mapped to the provided
key was removed, false if no
content is associated with the key.
IOException - if an error occurred while trying to remove the content.
InputStream getInputStream(String key)
throws IOException
key,
or null if no content is associated with the
key.
key - unique value associated with the content.
key,
or null if no content is associated with the
key.
IOException - if there is an error while getting the content stream for
reading.
OutputStream getOutputStream(String key)
throws IOException
key.
key - unique value associated with the content.
key.
IOException - if there is an error while getting the content stream for
writing.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||