20.17
java.lang.SecurityManager
THE PACKAGE JAVA.LANG
20.17.21
public void checkWrite(String file)
throws SecurityException
The general contract of this method is that it should throw a
SecurityException
if writing, modifying, creating (for output), or renaming the specified file or direc
tory is not permitted.
This method is invoked for the current security manager ( 20.18.4) by two
constructors for
java.io.FileOutputStream
( 22.16.1, 22.16.2); by two con
structors for
java.io.RandomAccessFile
( 22.23.1, 22.23.2); and by methods
canWrite
( 22.24.18),
mkdir
( 22.24.23), and
renameTo
( 22.24.27) of class
java.io.File
.
The
checkWrite
method defined by class
SecurityManager
always throws
a
SecurityException
. A subclass must override this method if write access to a
file is to be permitted with a security manager installed.
20.17.22
public void checkDelete(String file)
throws SecurityException
The general contract of this method is that it should throw a
SecurityException
if deleting the specified file is not permitted.
This method is invoked for the current security manager ( 20.18.4) by method
delete
( 22.24.28) of class
java.io.File
.
The
checkDelete
method defined by class
SecurityManager
always throws
a
SecurityException
. A subclass must override this method if a file deletion
operation is to be permitted with a security manager installed.
20.17.23
public void checkConnect(String host, int port)
throws SecurityException
The general contract of this method is that it should throw a
SecurityException
if connecting to the indicated
port
of the indicated network
host
is not permitted.
This method is invoked for the current security manager ( 20.18.4) by two
constructors for class
java.net.Socket
, methods
send
and
receive
of class
java.net.DatagramSocket
, and methods
getByName
and
getAllByName
of
class
java.net.InetAddress
. (These classes are not documented in this specifi
cation. See
The Java Application Programming Interface
.)
The
checkConnect
method defined by class
SecurityManager
always
throws a
SecurityException
. A subclass must override this method if a network
connection is to be permitted with a security manager installed.
576
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved