Here you can find the source of currentTimeStamp()
public static String currentTimeStamp()
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.util.Date; public class Main { public static String currentTimeStamp() { return DateFormat.getDateTimeInstance().format(new Date()); }/*from w w w. j a v a 2 s . co m*/ }