Java Temp File Create getTempFile()

Here you can find the source of getTempFile()

Description

get Temp File

License

Open Source License

Declaration

public static File getTempFile() throws IOException 

Method Source Code

//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;
    }
}

Related

  1. createTempFile(@Nonnull String prefix, @Nonnull String suffix, @Nullable File parentDir)
  2. createTempFile(final String file, final String ext)
  3. createTempFile(String oriFileName)
  4. getTempFile()
  5. getTempFile(File file)
  6. getTempFile(File parent, String fileName)
  7. getTempFile(final File stackFile)