|
|
|||||||||||||
Class UserFileIOAccesspublic class UserFileIOAccess implements ISecurityRequest { // Fields public static final int READ; public static final int READWRITE; public static final int WRITE; // Constructors public UserFileIOAccess(int accessType); // Methods public int getAccessFlags(); public PermissionID getPermissionID(); public String toString (); public static boolean validAccessType(int acc); } This class represents a request to perform a user-directed file I/O operation. UserFileIOAccess instances are intended to be used as the security request objects for parameterized security checks involving the user-directed file I/O permission. The UserFileIOPermission.check method expects a UserFileIOAccess object as its parameter. The following example shows how to use a UserFileIOAccess object to check permission for user-directed file I/O operations. ... // Create a UserFileIOAccess object that indicates that you // want to ask the user to choose a file to open for reading. UserFileIOAccess sreq = new UserFileIOAccess(UserFileIOAccess.READ); // Check to see that all of your callers have the rights to // initiate user-directed file operations for reading. PolicyEngine.checkPermission(sreq); ... For more information about checking file I/O permissions, see the PolicyEngine class and the UserFileIOPermission class. ConstructorsUserFileIOAccesspublic UserFileIOAccess(int accessType); MethodsgetAccessFlagspublic int getAccessFlags(); getPermissionIDpublic PermissionID getPermissionID(); toStringpublic String toString (); validAccessTypepublic static boolean validAccessType(int acc); Fields
|
© 1998 Microsoft Corporation. All rights reserved. Terms of use. |