Here you can find the source of generateFileId(String userlogin)
public static String generateFileId(String userlogin)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String generateFileId(String userlogin) { String pattern = "yyyyMMddHHmmssSSS"; DateFormat df = new SimpleDateFormat(pattern); String timestamp = df.format(new Date()); return userlogin + "_" + timestamp; }//from w w w .ja v a 2s . c om }