Here you can find the source of getTempFileName()
public static String getTempFileName()
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**// w ww .ja va2s . c o m * Create temp file name based on current datetime * * @return String format as "yyyyMMddHHmmss" */ public static String getTempFileName() { DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); return df.format(new Date()); } }