private static void checkFileValidation(File file){
  if (file == null)   throw new NullPointerException("File must not be null");
  if (!file.exists()) {
    throw new IllegalArgumentException("The file: " + file.getPath() + " doesn't exist.");
  }
  file.canRead();
}

private static void checkFileValidation ( File file ) { if ( file == null ) throw new NullPointerException ( "File must not be null" ) ; if ( ! file . exists ( ) ) { throw new IllegalArgumentException ( "The file: " + file . getPath ( ) + " doesn't exist." ) ; } file . canRead ( ) ; }
checks if the file is a valid file and readable .
