public class StructuredFileProxy extends Object implements StructuredStore
| Modifier and Type | Field and Description |
|---|---|
private File |
finalPath |
private StructuredFile |
realStore |
private File |
tmpPath |
| Constructor and Description |
|---|
StructuredFileProxy(File path) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the store.
|
SubStoreWriter |
createSubStore(String name)
Create a new sub-store with the specified name.
|
void |
delete()
Deletes the storage completely (implies close() first)
|
String |
getSystemId()
Gets the path, URI, or other unique identifier for this store
|
String |
getUserVersion()
Gets the user version (if any) set by
StructuredStore.setUserVersion(String). |
SubStoreReader |
openSubStore(String name)
Opens a pre-existing sub-store for read (or write).
|
private StructuredFile |
realStore() |
void |
setUserVersion(String ver)
Sets a user-defined version number for the file.
|
private File finalPath
private File tmpPath
private StructuredFile realStore
public SubStoreWriter createSubStore(String name) throws IOException
StructuredStorecreateSubStore in interface StructuredStorename - Name of the sub-file to create. Must not exist.IOExceptionpublic SubStoreReader openSubStore(String name) throws IOException
StructuredStoreopenSubStore in interface StructuredStorename - Name of pre-existing sub-store to open.IOExceptionpublic void close()
throws IOException
StructuredStoreclose in interface StructuredStoreIOExceptionpublic void delete()
throws IOException
StructuredStoredelete in interface StructuredStoreIOExceptionpublic String getSystemId()
StructuredStoregetSystemId in interface StructuredStorepublic void setUserVersion(String ver)
throws IOException
StructuredStoreStructuredStore.getUserVersion().setUserVersion in interface StructuredStorever - The version number to set.IOExceptionpublic String getUserVersion()
StructuredStoreStructuredStore.setUserVersion(String).getUserVersion in interface StructuredStoreprivate StructuredFile realStore()