Here you can find the source of parseHHMMSS(long time)
public static String parseHHMMSS(long time)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { private static final SimpleDateFormat FORMAT_HHMMSS = new SimpleDateFormat("HH:mm:ss"); private static final SimpleDateFormat FORMAT_YYYYMMDDHHMMSSLong = new SimpleDateFormat("yyyyMMddHHmmss"); public static String parseHHMMSS(long time) { try {/*w w w . j a v a 2s. co m*/ return FORMAT_HHMMSS.format(FORMAT_YYYYMMDDHHMMSSLong.parse(String.valueOf(time))); } catch (ParseException e) { e.printStackTrace(); } return null; } }