How can I check whether a file exists, before opening it for reading in Java (the equivalent of Perl\'s -e $filename>
-e $filename>
f.isFile() && f.canRead()