Here you can find the source of getTimeStringFrom(long timestamp)
public static String getTimeStringFrom(long timestamp)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String getTimeStringFrom(long timestamp) { if (timestamp <= 0) return ""; Date date = new Date(timestamp); SimpleDateFormat formatter = new SimpleDateFormat("HH:mm", Locale.getDefault()); return formatter.format(date); }/*from w w w. j a v a2 s . co m*/ }