| java.lang.Object java.security.Permission java.io.FilePermission
FilePermission | final public class FilePermission extends Permission implements Serializable(Code) | | The class FilePermission is responsible for granting access to files or
directories. The FilePermission is made up of a pathname and a set of actions
which are valid for the pathname.
The File.separatorChar must be used in all pathnames when
constructing a FilePermission. The following descriptions will assume the
char is /. A pathname which ends in "/*", implies all the
files and directories contained in that directory. If the pathname ends in
"/-", it indicates all the files and directories in that directory
recursively.
|
Field Summary | |
transient int | mask |
Constructor Summary | |
public | FilePermission(String path, String actions) Constructs a new FilePermission with the path and actions specified.
Parameters: path - the path to apply the actions to. Parameters: actions - the actions for the path. |
Method Summary | |
public boolean | equals(Object obj) Check to see if this permission is equal to another. | public String | getActions() Answers the actions associated with the receiver. | public int | hashCode() Answers an int representing the hash code value for this FilePermission. | public boolean | implies(Permission p) Indicates whether the argument permission is implied by the receiver.
Parameters: p - java.security.Permission the permission to check. | int | impliesMask(Permission p) Answers an int describing what masks are implied by a specific
permission. | public PermissionCollection | newPermissionCollection() Answers a new PermissionCollection in which to place FilePermission
Objects. |
FilePermission | public FilePermission(String path, String actions)(Code) | | Constructs a new FilePermission with the path and actions specified.
Parameters: path - the path to apply the actions to. Parameters: actions - the actions for the path. May be anycombination of read, write, execute, or delete. |
equals | public boolean equals(Object obj)(Code) | | Check to see if this permission is equal to another. The two are equal if
obj is a FilePermission, they have the same path, and they
have the same actions.
Parameters: obj - the object to check equality with. true if the two are equal, false otherwise. |
getActions | public String getActions()(Code) | | Answers the actions associated with the receiver.
the actions associated with the receiver. |
hashCode | public int hashCode()(Code) | | Answers an int representing the hash code value for this FilePermission.
int the hash code value for this FilePermission. |
implies | public boolean implies(Permission p)(Code) | | Indicates whether the argument permission is implied by the receiver.
Parameters: p - java.security.Permission the permission to check. true if the argument permission is implied by thereceiver, and false if it is not. |
impliesMask | int impliesMask(Permission p)(Code) | | Answers an int describing what masks are implied by a specific
permission.
Parameters: p - the permission the mask applied to the given permission |
newPermissionCollection | public PermissionCollection newPermissionCollection()(Code) | | Answers a new PermissionCollection in which to place FilePermission
Objects.
A new PermissionCollection suitable for storing FilePermissionobjects. |
|
|