|
Bees v0.5.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bees.core.Capability | +--bees.core.resource.PathSpec | +--bees.core.resource.File
Capability to govern access to a disk file.
Field Summary | |
static PermissionSet |
DEFAULT_PERMISSIONS
The default permissions for a new file capability. |
static FilePermission |
FILE_APPEND_PERMISSION
Permission to append to the file. |
static Permission |
FILE_DELETE_PERMISSION
Permission to delete the file. |
static Permission |
FILE_LENGTH_PERMISSION
Permission to get the file's length. |
static Permission |
FILE_READ_LAST_MODIFIED_PERMISSION
Permission to read the file's last modified time. |
static Permission |
FILE_READ_PERMISSION
Permission to read the file. |
static Permission |
FILE_WRITE_LAST_MODIFIED_PERMISSION
Permission to write the file's last modified time. |
static Permission |
FILE_WRITE_PERMISSION
Permission to write to the file. |
Fields inherited from class bees.core.Capability |
DELETE_PERMISSION, id, INVALID_ID |
Constructor Summary | |
File()
Construct an empty File capability. |
Method Summary | |
void |
delete()
Delete the file on disk. |
protected void |
fromBytes(byte[] flattened,
CapabilityEnvelope[] sub)
Bind this capability to the given object. |
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
java.io.OutputStream |
getOutputStream(boolean append)
|
void |
getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
void |
handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
long |
lastModified(Clock clock)
Get the last modified time of the file. |
long |
length()
|
edu.utah.janosvm.kit.comm.jsi.JSIHandler |
resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
|
void |
revoke()
Revoke access to the capability. |
java.lang.String |
toString()
|
Methods inherited from class bees.core.resource.PathSpec |
getFactory, specFromBytes, toBytes |
Methods inherited from class bees.core.Capability |
checkPermission, clear, clonePermission, deleteCapability, equals, fromBytes, revokedPermission, revokePermission, revokePermissions, valid |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Permission FILE_READ_PERMISSION
public static final Permission FILE_WRITE_PERMISSION
public static final FilePermission FILE_APPEND_PERMISSION
public static final Permission FILE_LENGTH_PERMISSION
public static final Permission FILE_READ_LAST_MODIFIED_PERMISSION
public static final Permission FILE_WRITE_LAST_MODIFIED_PERMISSION
public static final Permission FILE_DELETE_PERMISSION
public static final PermissionSet DEFAULT_PERMISSIONS
Constructor Detail |
public File()
Method Detail |
protected void fromBytes(byte[] flattened, CapabilityEnvelope[] sub) throws java.lang.Exception
Capability
fromBytes
in class Capability
Capability.fromBytes(byte[], CapabilityEnvelope[])
public void revoke()
Capability
revoke
in class PathSpec
Capability.revoke()
public long lastModified(Clock clock)
clock
- A clock from which to base the returned time value on.public long length()
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
- If the file no longer exists in the local
file system. XXX This really shouldn't be here.java.io.IOException
- If there is a problem opening the file.public java.io.OutputStream getOutputStream(boolean append) throws java.io.FileNotFoundException
append
- True if the stream should start at the end of the file.java.io.FileNotFoundException
- If the file no longer exists in the local
file system. XXX This really shouldn't be here.public java.io.OutputStream getOutputStream() throws java.io.FileNotFoundException
java.io.FileNotFoundException
- If the file no longer exists in the local
file system. XXX This really shouldn't be here.public void delete()
public edu.utah.janosvm.kit.comm.jsi.JSIHandler resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm, edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
resolveSpecifier
in interface edu.utah.janosvm.kit.comm.jsi.JSIHandler
JSIHandler.resolveSpecifier(JSIMessage, JSIPair)
public void handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc, edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
handleMessage
in interface edu.utah.janosvm.kit.comm.jsi.JSIHandler
JSIHandler.handleMessage(JSIHandlerContext, JSIMessage)
public void getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
getSuites
in interface edu.utah.janosvm.kit.comm.jsi.JSIHandler
JSIHandler.getSuites(JSIMessage)
public java.lang.String toString()
toString
in class PathSpec
Object.toString()
|
Bees v0.5.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |