Here you can find the source of getTimestamp()
public static String getTimestamp()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getTimestamp() { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); return sdf.format(new Date()) + (int) ((Math.random() * 900000 + 100000)); }/* www. j av a 2 s . c om*/ }