in class file ,when security Manger is not null.function canRead()return true or false?

T

Thomas Fritsch

when you know where the API docs are, the documentation of canRead will
tell you!
 
J

junzhang1983

java apl explain canRead like below:

public boolean canRead()

Tests whether the application can read the file denoted by this
abstract pathname.

Returns:
true if and only if the file specified by this abstract
pathname exists and can be read by the application; false otherwise
Throws:
SecurityException - If a security manager exists and its
SecurityManager.checkRead(java.lang.String) method denies read access
to the file

but still don't know in what condition will return false?and in what
condition will throw SecurityException?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top