jodd-core/src/main/java/jodd/io/FileUtil.java
public static File createTempFile(final String prefix, final String suffix, final File tempDir) throws IOException {
		int exceptionsCount = ZERO;
		while (true) {
			try {
				return File.createTempFile(prefix, suffix, tempDir).getCanonicalFile();
			} catch (IOException ioex) {  // fixes java.io.WinNTFileSystem.createFileExclusively access denied
				if (++exceptionsCount >= 50) {
					throw ioex;
				}
			}
		}
	}
public static File createTempFile(final String prefix, final String suffix, final File tempDir) throws IOException {
		int exceptionsCount = ZERO;
		while (true) {
			try {
				return File.createTempFile(prefix, suffix, tempDir).getCanonicalFile();
			} catch (IOException ioex) {  // fixes java.io.WinNTFileSystem.createFileExclusively access denied
				if (++exceptionsCount >= 50) {
					throw ioex;
				}
			}
		}
	}
Creates temporary {@link File}. Wraps Java method and repeats creation several times
if something fails.

@param prefix  The prefix string to be used in generating the file's
name; must be at least three characters long
@param suffix  The suffix string to be used in generating the file's
name; may be {@code null}, in which case the
suffix {@code ".tmp"} will be used
@param tempDir The directory in which the file is to be created, or
{@code null} if the default temporary-file
directory is to be used