M
- the type of the file system model.D
- the type of the ZIP driver.@Immutable public abstract class KeyController<M extends FsModel,D extends ZipDriver> extends FsDecoratingController<M,FsController<? extends M>>
Modifier and Type | Field and Description |
---|---|
protected D |
driver |
delegate
Modifier | Constructor and Description |
---|---|
protected |
KeyController(FsController<? extends M> controller,
D driver)
Constructs a new key manager controller.
|
Modifier and Type | Method and Description |
---|---|
FsEntry |
getEntry(FsEntryName name)
Returns the file system entry for the given name or
null if it
doesn't exist. |
protected abstract Class<? extends IOException> |
getKeyExceptionType() |
protected abstract Class<?> |
getKeyType() |
void |
sync(BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of this file system
to its parent file system,
releases the associated resources (e.g.
|
void |
unlink(FsEntryName name,
BitField<FsOutputOption> options)
Removes the named file system entry from the file system.
|
getInputSocket, getOutputSocket, getParent, isExecutable, isReadable, isReadOnly, isWritable, mknod, setReadOnly, setTime, setTime, toString
getModel, getMountPoint, isMounted, setMounted
equals, hashCode
protected KeyController(FsController<? extends M> controller, D driver)
controller
- the non-null
file system controller to
decorate.driver
- the ZIP driver.public FsEntry getEntry(FsEntryName name) throws IOException
FsController
null
if it
doesn't exist.
Modifying the returned entry does not show any effect on the file system
and may result in an UnsupportedOperationException
.getEntry
in class FsDecoratingController<M extends FsModel,FsController<? extends M extends FsModel>>
name
- the name of the file system entry.null
if no file system entry
exists for the given name.IOException
- on any I/O failure.protected abstract Class<? extends IOException> getKeyExceptionType()
protected abstract Class<?> getKeyType()
public void sync(BitField<FsSyncOption> options) throws FsSyncException
FsController
sync
in class FsDecoratingController<M extends FsModel,FsController<? extends M extends FsModel>>
options
- the options for synchronizing the file system.FsSyncWarningException
- if only warning conditions
apply.
This implies that the respective parent file system has been
synchronized with constraints, e.g. if an unclosed archive entry
stream gets forcibly closed.FsSyncException
- if any error conditions apply.public void unlink(FsEntryName name, BitField<FsOutputOption> options) throws IOException
FsController
unlink
in class FsDecoratingController<M extends FsModel,FsController<? extends M extends FsModel>>
name
- the file system entry name.options
- output options for this operation.IOException
- on any I/O failure.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.