The checkWrite method of the StandardSecurityManager Class contains the following signatures:
checkWrite(String file)
checkWrite(FileDescriptor fd)
Determines whether the specified file can be written to by the classes active within the current execution context.
The check succeeds only if all the classes found on the call stack possess FileIOPermissions and if those permissions allow write access to the specified file. This method overrides the java.lang.SecurityManager.checkWrite(String) method.
public void checkWrite(String file);
file | The system-dependent file name. |
SecurityException if the security check fails.
Determines whether classes within the current execution context, based on the call stack of the current thread, can use the specified FileDescriptor object to write to the file it is associated with.
public void checkWrite(FileDescriptor fd);
fd | The file descriptor that is associated with the file. |
The check succeeds only if all the classes found on the call stack are fully trusted system classes. This method overrides the java.lang.SecurityManager.checkWrite(FileDescriptor) method.
SecurityException if the security check fails.