Here you can find the source of getRandomFileName()
public static String getRandomFileName()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static String getRandomFileName() { String fileName = ""; java.util.Date dt = new java.util.Date(System.currentTimeMillis()); SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmssSSS"); fileName = fmt.format(dt);//from w w w . j a v a 2 s. c om return fileName; } }