Here you can find the source of getTempFile()
public static File getTempFile() throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.util.HashSet; import java.util.Set; public class Main { static Set tempFiles = new HashSet(); public static File getTempFile() throws IOException { File f = File.createTempFile("tmp", ".html", null); tempFiles.add(f);/*ww w . jav a2s . c o m*/ return f; } }