Here you can find the source of parse(Long time)
public static Date parse(Long time)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); public static Date parse(Long time) { if (time == null) { return null; }// w ww . ja v a2s .c o m Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(time); return cal.getTime(); } public static String getTime(String pattern) { return new SimpleDateFormat(pattern).format(new Date()); } }