Here you can find the source of getTempFile(String tmpdir)
public static synchronized File getTempFile(String tmpdir)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { static long counter = 1L; public static synchronized File getTempFile(String tmpdir) { String name = String .valueOf(System.currentTimeMillis() + ++counter); return new File(tmpdir, name); }/*from w w w . j a v a 2 s . c om*/ }