jodd-core/src/main/java/jodd/io/FileUtil.java
public static File createTempFile(final String prefix, final String suffix, final File tempDir, final boolean create) throws IOException {
		File file = createTempFile(prefix, suffix, tempDir);
		file.delete();
		if (create) {
			file.createNewFile();
		}
		return file;
	}
public static File createTempFile(final String prefix, final String suffix, final File tempDir, final boolean create) throws IOException {
		File file = createTempFile(prefix, suffix, tempDir);
		file.delete();
		if (create) {
			file.createNewFile();
		}
		return file;
	}
Creates temporary {@link File}.

@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
@param create  If {@code create} is set to {@code true} {@link File} will be
physically created on the file system. Otherwise, it will be created and then
deleted - trick that will make temp {@link File} exist only if they are used.
@return File