|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileSystem
An abstraction of a FileSystem supporting operations needed by
disk XMLStore implementations. Every FileSystem has a
unique FileSystemIdentifier that can be used to identify it. All
Locators returned by a FileSystem will contain this
FileSystemIdentifier so that the origin of the Locator
can be determined.
| Method Summary | |
|---|---|
LocalLocator |
all()
Returns a LocalLocator to all content currently in this
FileSystem. |
LocalLocator |
allocate()
Returns a LocalLocator to a free write position that
can hold size number of bytes. |
LocalLocator |
allocate(int size)
|
LocalLocator |
allocate(int size,
FileSystemIdentifier fsi)
|
void |
close()
Closes the file system and releases all resources. |
void |
copy(FileSystem fs,
LocalLocator fromLoc,
LocalLocator toLoc)
Copies the data at fromLoc in the specified
FileSystem to toLoc in this
FileSystem. |
FileSystemIdentifier |
currentIdentifier()
|
void |
free(LocalLocator loc)
Frees the space occupied by the specified LocalLocator. |
DataInput |
getInput(LocalLocator loc)
Positions the input at the specified location and returns a DataInput for reading. |
DataOutput |
getOutput(LocalLocator loc)
Positions the output at the specified location and returns a DataOutpu for writing. |
boolean |
isContained(LocalLocator loc)
Returns true if the specified LocalLocator
originates from this FileSystem. |
long |
size()
Returns the size of the FileSystem. |
| Method Detail |
|---|
void copy(FileSystem fs,
LocalLocator fromLoc,
LocalLocator toLoc)
throws IOException,
UnknownLocatorException
fromLoc in the specified
FileSystem to toLoc in this
FileSystem.
IOException
UnknownLocatorException
DataInput getInput(LocalLocator loc)
throws IOException,
UnknownLocatorException
DataInput for reading. The DataInput is
shared so if multiple threads operate on the same
FileSystem concurrently, external synchronization should
be used.
IOException
UnknownLocatorException
DataOutput getOutput(LocalLocator loc)
throws IOException,
UnknownLocatorException
DataOutpu for writing. Note, that this can overwrite
existing data. The DataInput is shared so if multiple
threads operate on the same FileSystem
concurrently, external synchronization should be used.
When writing new data allocate() should be called first.
IOException
UnknownLocatorException
LocalLocator allocate()
throws IOException
LocalLocator to a free write position that
can hold size number of bytes.
IOException
LocalLocator allocate(int size)
throws IOException
IOException
LocalLocator allocate(int size,
FileSystemIdentifier fsi)
throws IOException
IOExceptionFileSystemIdentifier currentIdentifier()
boolean isContained(LocalLocator loc)
true if the specified LocalLocator
originates from this FileSystem.
LocalLocator all()
throws IOException
LocalLocator to all content currently in this
FileSystem.
IOException
void free(LocalLocator loc)
throws IOException,
UnknownLocatorException
LocalLocator.
IOException
UnknownLocatorException
long size()
throws IOException
FileSystem.
IOException
void close()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||