private boolean canReadFile(File file){
  if (!file.exists()) {
    log.info("File " + file.getAbsolutePath() + " does not exist");
    return false;
  }
  if (!file.canRead()) {
    log.info("File " + file.getAbsolutePath() + " cannot be read");
    return false;
  }
  return true;
}

private boolean canReadFile ( File file ) { if ( ! file . exists ( ) ) { log . info ( "File " + file . getAbsolutePath ( ) + " does not exist" ) ; return false ; } if ( ! file . canRead ( ) ) { log . info ( "File " + file . getAbsolutePath ( ) + " cannot be read" ) ; return false ; } return true ; }
tests whether the file exists and can be read by the application .
