|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.fs.FsController<M>
M - The type of the file system model.@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public abstract class FsController<M extends FsModel>
An abstract class which provides read/write access to a file system.
This class may be organized in a chain of responsibility for file system
federation.
The mount point of the
file system model addresses the file system at the head
of this chain of federated file systems.
Where the methods of this abstract class accept a
file system entry name as a parameter, this will get
resolved against the mount point URI of this
controller's file system model.
Sub-classes must be reentrant on exceptions - so users may repeatedly call their methods.
| Constructor Summary | |
|---|---|
FsController()
|
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object that)
Two file system controllers are considered equal if and only if they are identical. |
|
abstract Icon |
getClosedIcon()
|
|
abstract FsEntry |
getEntry(FsEntryName name)
|
|
abstract InputSocket<?> |
getInputSocket(FsEntryName name,
BitField<FsInputOption> options)
Returns an input socket for reading the contents of the entry addressed by the given name from the file system. |
|
abstract M |
getModel()
Returns the file system model. |
|
abstract Icon |
getOpenIcon()
|
|
abstract OutputSocket<?> |
getOutputSocket(FsEntryName name,
BitField<FsOutputOption> options,
Entry template)
Returns an output socket for writing the contents of the entry addressed by the given name to the file system. |
|
abstract FsController<?> |
getParent()
Returns the controller for the parent file system or null if
and only if this file system is not federated, i.e. not a member of
another file system. |
|
int |
hashCode()
Returns a hash code which is consistent with equals(java.lang.Object). |
|
abstract boolean |
isReadable(FsEntryName name)
|
|
abstract boolean |
isReadOnly()
|
|
abstract boolean |
isWritable(FsEntryName name)
|
|
abstract void |
mknod(FsEntryName name,
Entry.Type type,
BitField<FsOutputOption> options,
Entry template)
Creates or replaces and finally links a chain of one or more entries for the given entry name into the file system. |
|
abstract void |
setReadOnly(FsEntryName name)
|
|
abstract boolean |
setTime(FsEntryName name,
BitField<Entry.Access> types,
long value)
|
|
void |
sync(BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of this file to its parent file system. |
|
abstract
|
sync(BitField<FsSyncOption> options,
ExceptionHandler<? super FsSyncException,X> handler)
Commits all unsynchronized changes to the contents of this file system to its parent file system. |
|
String |
toString()
Returns a string representation of this object for debugging and logging purposes. |
|
abstract void |
unlink(FsEntryName name)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FsController()
| Method Detail |
|---|
public abstract M getModel()
@Nullable public abstract FsController<?> getParent()
null if
and only if this file system is not federated, i.e. not a member of
another file system.
@Nullable
public abstract Icon getOpenIcon()
throws IOException
IOException
@Nullable
public abstract Icon getClosedIcon()
throws IOException
IOException
public abstract boolean isReadOnly()
throws IOException
IOException
@CheckForNull
public abstract FsEntry getEntry(FsEntryName name)
throws IOException
IOException
public abstract boolean isReadable(FsEntryName name)
throws IOException
IOException
public abstract boolean isWritable(FsEntryName name)
throws IOException
IOException
public abstract void setReadOnly(FsEntryName name)
throws IOException
IOException
public abstract boolean setTime(FsEntryName name,
BitField<Entry.Access> types,
long value)
throws IOException
IOException
public abstract InputSocket<?> getInputSocket(FsEntryName name,
BitField<FsInputOption> options)
name - a file system entry name.
InputSocket.
public abstract OutputSocket<?> getOutputSocket(FsEntryName name,
BitField<FsOutputOption> options,
@CheckForNull
Entry template)
template is not null, then the output entry shall
have as many of its properties copied as reasonable, e.g. the last
modification time.
name - a file system entry name.template - a nullable template for the properties of the output
entry.
OutputSocket.
public abstract void mknod(FsEntryName name,
Entry.Type type,
BitField<FsOutputOption> options,
@CheckForNull
Entry template)
throws IOException
name into the file system.
name - the file system entry name.type - the file system entry type.options - the file system output options.
If CREATE_PARENTS is set, any missing parent directories
will be created and linked into this file system with its last
modification time set to the system's current time.template - if not null, then the file system entry
at the end of the chain shall inherit as much properties from
this entry as possible - with the exception of its name and type.
IOException - for some other I/O related reason, including but
not exclusively upon one or more of the following conditions:
name contains characters which are not
supported by the file system.
FsOutputOption.EXCLUSIVE is set or the entry is a
directory.
createParents is
false.
public abstract void unlink(FsEntryName name)
throws IOException
IOException
public final void sync(BitField<FsSyncOption> options)
throws FsSyncException
This method calls sync(options, builder), where builder is
an instance of FsSyncExceptionBuilder.
If the call succeeds, the builder's AbstractExceptionBuilder.check()
method is called to check out any FsSyncWarningException, too.
options - the synchronization options.
FsSyncException - if committing the changes fails for any reason.
IllegalArgumentException - if the combination of synchronization
options is illegal, e.g. if FORCE_CLOSE_INPUT is cleared
and FORCE_CLOSE_OUTPUT is set.
public abstract <X extends IOException> void sync(BitField<FsSyncOption> options,
ExceptionHandler<? super FsSyncException,X> handler)
throws X extends IOException
X - the type of the IOException to throw at the
discretion of the exception handler.options - the synchronization options.handler - the exception handling strategy for dealing with one or
more input FsSyncExceptions which may trigger an X.
IllegalArgumentException - if the combination of synchronization
options is illegal, e.g. if FORCE_CLOSE_INPUT is cleared
and FORCE_CLOSE_OUTPUT is set.
X extends IOException
public final boolean equals(@CheckForNull
Object that)
equals in class Objectpublic final int hashCode()
equals(java.lang.Object).
This can't get overriden.
hashCode in class Objectpublic String toString()
toString in class Object
|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||