|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Factory for creating Storage
instances.
Because of the large number of 'files' that
Method Summary | |
Storage |
createStorage(java.lang.String name)
Creates an input stream that is uniquely identified by the specified name. |
void |
delete(java.lang.String name)
Deletes the data in the namespace of this instance specified by name. |
void |
deleteAll()
Deletes all data that are in the namespace of this instance. |
Method Detail |
public Storage createStorage(java.lang.String name) throws java.io.IOException
Creates an input stream that is uniquely identified by the specified
name. Implementing classes typically have a separate namespace
(subdirectory in case of files) for each instance. The name
parameter uniquely and inambiguously specifies the exact location to
read/write data: this method returns a Storage
to the same location if and
only if the name is equal.
Note: because it is impossible to know what characters are supported by the specific implementation, one is advised to be conservative in the use of the name parameter; keep it short, use either lowercase or uppercase characters, do not use '+', '-', '&', '>', etc.
name
- name of the Storage
instance
java.io.IOException
public void deleteAll() throws java.io.IOException
Deletes all data that are in the namespace of this instance. Typical file-based implementations would delete all files in the directory this instance uses.
true
if data was deleted, false
if
otherwise.
java.io.IOException
public void delete(java.lang.String name) throws java.io.IOException
Deletes the data in the namespace of this instance specified by name. Typical file-based implementations would delete the file specified by name from the directory this instance uses.
Should not throw any exception if the specified file does not exist.
name
- name of the data to delete
java.io.IOException
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |