java.io
Class FilePermissionCollection
java.lang.Object
|
+--java.security.PermissionCollection
|
+--java.io.FilePermissionCollection
- All Implemented Interfaces:
- Serializable
- final class FilePermissionCollection
- extends PermissionCollection
- implements Serializable
A FilePermissionCollection stores a set of FilePermission permissions.
FilePermission objects
must be stored in a manner that allows them to be inserted in any
order, but enable the implies function to evaluate the implies
method.
For example, if you have two FilePermissions:
- "/tmp/-", "read"
- "/tmp/scratch/foo", "write"
And you are calling the implies function with the FilePermission:
"/tmp/scratch/foo", "read,write", then the implies function must
take into account both the /tmp/- and /tmp/scratch/foo
permissions, so the effective permission is "read,write".
- Version:
- 1.69 12/03/01
- Author:
- Marianne Mueller, Roland Schemers
- See Also:
java.security.Permission
,
java.security.Permissions
,
java.security.PermissionCollection
,
Serialized Form
Method Summary |
void |
add(Permission permission)
Adds a permission to the FilePermissions. |
Enumeration |
elements()
Returns an enumeration of all the FilePermission objects in the
container. |
boolean |
implies(Permission permission)
Check and see if this set of permissions implies the permissions
expressed in "permission". |
permissions
private Vector permissions
FilePermissionCollection
public FilePermissionCollection()
- Create an empty FilePermissions object.
add
public void add(Permission permission)
- Adds a permission to the FilePermissions. The key for the hash is
permission.path.
- Specified by:
add
in class PermissionCollection
- Parameters:
permission
- the Permission object to add.
implies
public boolean implies(Permission permission)
- Check and see if this set of permissions implies the permissions
expressed in "permission".
- Specified by:
implies
in class PermissionCollection
- Parameters:
permission
- the Permission object to compare.
- Returns:
- true if "permission" is a proper subset of a permission in
the set, false if not.
elements
public Enumeration elements()
- Returns an enumeration of all the FilePermission objects in the
container.
- Specified by:
elements
in class PermissionCollection
- Returns:
- an enumeration of all the FilePermission objects.
comments?