public static boolean isFileReadable(String fileName){
  final File file=new File(fileName);
  return file.exists() && file.canRead();
}

public static boolean isFileReadable ( String fileName ) { final File file = new File ( fileName ) ; return file . exists ( ) && file . canRead ( ) ; }
checks whether the given file is readable
