I'm looking for a safe way to create a temp file in Java. By safe, I mean the following:
File tempFile = File.createTempFile("prefix-", "-suffix");
//File tempFile = File.createTempFile("MyAppName-", ".tmp");
tempFile.deleteOnExit();
Will create a file in the temp dir, like:
prefix-6340763779352094442-suffix