FilePermission class methods in Java

java.io.FilePermission

This class represents access to a file or directory. A FilePermission consists of a pathname and a set of actions valid for that pathname. The pathname is the pathname of the file or directory granted the specified actions.

Implemented Interfaces:

Serializable, Guard

Some methods of FilePermission class

equals(Object): This method checks two FilePermission objects for equality. Checks that obj is a FilePermission, and has the same pathname and actions as this object.

FilePermission(String, String): This method creates a new FilePermission object with the specified actions.

getActions(): This method returns the "canonical string representation" of the actions.

hashCode(): This method returns the hash code value for this object.

implies(Permission): This method checks if this FilePermission object "implies" the specified permission.

newPermissionCollection(): This method returns a new PermissionCollection object for storing FilePermission objects.

No comments:

Post a Comment