Here you can find the source of toLongString(long ms)
public static String toLongString(long ms)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String toLongString(long ms) { return format(ms, "yyyy-MM-dd HH:mm:ss.SSS"); }//www . j a va2 s.c o m public static String format(long ms, String pattern) { DateFormat df = new SimpleDateFormat(pattern); return df.format(new Date(ms)); } }