|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Store
This interface specifies the common behavior of store implementations.
| Method Summary | |
|---|---|
void |
close()
Closes this instance. |
boolean |
contains(String name)
|
void |
delete(String name)
|
InputStream |
get(String name)
|
void |
get(String name,
OutputStream os)
Streams the data corresponding to the given name into the given stream. |
long |
getContentLength(String name)
|
long |
getLastModified(String name)
|
String[] |
list(String baseName)
Returns the list of names corresponding to stored data, relative to the given base name. |
void |
put(String name,
InputStream is)
Stores the data corresponding to the given stream under the named passed in. |
| Method Detail |
|---|
void put(String name,
InputStream is)
throws IOException
name - the name under which to keep the passed in data.is - an InputStream containing data to save.
IOException - if an IO problem occurs while performing this operation.
void get(String name,
OutputStream os)
throws IOException,
FileNotFoundException
name - the name corresponding to the data to retrieve.os - an OutputStream to which the data is to be written.
IOException - if an IO problem occurs while performing this operation.
FileNotFoundException - if no data exists for the given name.
InputStream get(String name)
throws IOException,
FileNotFoundException
name - the name corresponding to the data to retrieve.
IOException - if an IO problem occurs while performing this operation.
FileNotFoundException - if no data exists for the given name.
void delete(String name)
throws IOException
name - the name corresponding to the data to delete.
IOException - if an IO problem occurs while performing this operation.
boolean contains(String name)
throws IOException
name - the name corresponding to the data whose existence must be checked.
IOException
String[] list(String baseName)
throws IOException
some/path/to/file,
the file fragment will be relative to some/path/to (therefore,
passing some/path/to as a base name to this method would return all names
immediately "under" that base name).
If the passed in base name is null or is an empty string, then the returned
names will be returned relatively to the "root" of this instance.
baseName - a base name.
IOExceptionvoid close()
long getContentLength(String name)
throws FileNotFoundException,
IOException
name - the name corresponding to the data whose length must be returned.
FileNotFoundException
IOException
long getLastModified(String name)
throws FileNotFoundException,
IOException
name - the name corresponding to the data whose timestamp must be returned..
millis, at which the data was last modified.
FileNotFoundException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||