Here you can find the source of generateFileName(long sysTime)
Parameter | Description |
---|---|
sysTime | System time in milliseconds |
public static String generateFileName(long sysTime)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { /**// w ww .j a va2 s .com * Generate file name from system time in the format "yyyyMMdd-HHmmss-SSS", * @param sysTime System time in milliseconds */ public static String generateFileName(long sysTime) { return new SimpleDateFormat("yyyyMMdd-HHmmss-SSS", Locale.US) .format(new Date(sysTime)); } }