Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Check file readability in Java

File operation is quite platform dependent. Although Java is a cross platform programming language, the file operation in Java is also platform dependent. The obvious evidence is the file permission check. In Java, we can call canRead(), canWrite() and canExecutable() to check whether the program can read, write or execute the file specified. However, on Windows, when we call canRead() on a File object, we may get unexpected result.Actually, on Windows, when we call canRead() on a File object, we will always get the true returned even if we have denied the read access to the file. There is als...

38,045 0       JAVA READABLE CHECK FILES