Here you can find the source of getTimeStr(Time time)
static public String getTimeStr(Time time)
//package com.java2s; //License from project: Open Source License import java.sql.Time; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from w ww. j a v a 2 s . c o m * format pattern : HH:mm:ss */ public static final SimpleDateFormat FORMAT_HMS = new SimpleDateFormat("HH:mm:ss"); static public String getTimeStr(Time time) { return FORMAT_HMS.format(time); } static public String format(Date date, String formatText) throws Exception { SimpleDateFormat format = new SimpleDateFormat(formatText); return format.format(date); } }