public static File createTmpFile(String pathToFile) throws IOException {
  File file=new File(pathToFile);
  if (file.exists()) {
    file.delete();
  }
  if (!file.createNewFile()) {
    LOGGER.warn("Couldn't create new File! Maybe the file " + file.getAbsolutePath() + " already exists!");
  }
  return file;
}

public static File createTmpFile ( String pathToFile ) throws IOException { File file = new File ( pathToFile ) ; if ( file . exists ( ) ) { file . delete ( ) ; } if ( ! file . createNewFile ( ) ) { LOGGER . warn ( "Couldn't create new File! Maybe the file " + file . getAbsolutePath ( ) + " already exists!" ) ; } return file ; }
create a new temporary file . if the file already exists it is replaced .
