A little bit confuse of the following
checkPermission
public void checkPermission(Permission perm)
throws AccessControlExceptionDetermines
whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object.
This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise.
Parameters:
perm - the requested permission.
Throws:
AccessControlException - if the specified permission is not permitted, based on the current security policy and the context encapsulated by this object.
Can I override the above method so that I can set the permission of the action
But I do not know the object reference of the Permission object,Can I use Permission object point to the pathname of a file?
Most Permission objects also include an "actions" list that tells the actions that are permitted for the object. For example, for a java.io.FilePermission object, the permission name is the pathname of a file (or directory), and the actions list (such as "read, write") specifies which actions are granted for the specified file (or for files in the specified directory). The actions list is optional for Permission objects, such as java.lang.RuntimePermission, that don't need such a list; you either have the named permission (such as "system.exit") or you don't.
please help me how do I need to do.
thanks