|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileSystem
A file system with allocation and free capabilities. Reading and writing is
done through PositionalData.
| Method Summary | |
|---|---|
Bound |
all()
Returns a locator encapsulating all data currently in this file system. |
Bound |
allocate()
(Optional) Returns a locator to a free write position that can hold an unspecified amount of bytes. |
Bound |
allocate(long size)
Returns a locator to a free write position that can hold size number of bytes. |
void |
clear()
Frees all data in this FileSystem. |
void |
clearModified()
Marks this file system as unmodified. |
void |
close()
Closes this file system and releases all resources. |
void |
free(Bound loc)
Frees the space occupied by the specified Bound. |
PositionalData |
getData(Locator loc)
Returns a PositionalData for reading and writing to the
FileSystem at the specified location. |
Bound |
getMeta()
Returns a locator to a special block of meta data. |
SourceId |
id()
Returns a SourceId identifying this FileSystem
in its present state. |
boolean |
isContained(Locator loc)
Returns true if the specified Locator
originates from this FileSystem and is valid. |
boolean |
isModified()
Returns true if this file system has been modified since
it was created or since the last call to clearModified(). |
boolean |
isReadOnly()
Returns true if this file system is read-only. |
void |
setMeta(Bound b)
Sets the meta data pointer of this file system. |
void |
setReadOnly(boolean isReadOnly)
Sets the read-only status of this file system. |
long |
size()
Returns the size of this file system. |
| Method Detail |
|---|
SourceId id()
throws IOException
SourceId identifying this FileSystem
in its present state. The SourceId can change at any point
and is not necessarily equal to the SourceIds
returned by allocation method even though these may still be valid. Thus,
this SourceId should be regarded as a unique canonical
id that identifies only the present state of this FileSystem.
IOException
PositionalData getData(Locator loc)
throws IOException,
InvalidSourceIdException,
OutOfBoundsException
PositionalData for reading and writing to the
FileSystem at the specified location.
IOException - if an I/O error occurred.
InvalidSourceIdException - if the file system identifier of
the locator is invalid.
OutOfBoundsException - if the locator is out of bounds.
Bound allocate()
throws IOException,
UnsupportedOperationException
UnsupportedOperationException if this is not supported.
IOException - if an I/O error occurred.
UnsupportedOperationException - if not supported.
Bound allocate(long size)
throws IOException
size number of bytes.
IOException - if an I/O error occurred or the specified amount of
bytes could not be allocated.
boolean isContained(Locator loc)
throws IOException
true if the specified Locator
originates from this FileSystem and is valid.
IOException
Bound all()
throws IOException
IOException - if an I/O error occurred.
void free(Bound loc)
throws IOException,
InvalidSourceIdException,
OutOfBoundsException
Bound.
IOException - if an I/O error occurred.
InvalidSourceIdException - if the file system identifier of
the locator is invalid.
OutOfBoundsException - if the locator is out of bounds.
void clear()
throws IOException
FileSystem.
IOException
Bound getMeta()
throws IOException
null is returned.
IOException
void setMeta(Bound b)
throws IOException
IOException
long size()
throws IOException
IOException - if an I/O error occurred.
void close()
throws IOException
IOException - if an I/O error occurred.
boolean isModified()
throws IOException
true if this file system has been modified since
it was created or since the last call to clearModified().
IOException
void clearModified()
throws IOException
IOException
boolean isReadOnly()
throws IOException
true if this file system is read-only.
IOException
void setReadOnly(boolean isReadOnly)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||