private boolean isFileValid(File file,String methodName){
  if (file == null) {
    Log.printConcatLine(name,".",methodName,": Warning - the given file is null.");
    return false;
  }
  String fileName=file.getName();
  if (fileName == null || fileName.length() == 0) {
    Log.printConcatLine(name,"." + methodName,": Warning - invalid file name.");
    return false;
  }
  return true;
}

private boolean isFileValid ( File file , String methodName ) { if ( file == null ) { Log . printConcatLine ( name , "." , methodName , ": Warning - the given file is null." ) ; return false ; } String fileName = file . getName ( ) ; if ( fileName == null || fileName . length ( ) == 0 ) { Log . printConcatLine ( name , "." + methodName , ": Warning - invalid file name." ) ; return false ; } return true ; }
check if the file is valid or not . this method checks whether the given file or the file name of the file is valid . the method name parameter is used for debugging purposes , to output in which method an error has occurred .
