Here you can find the source of ParseTime(final String time)
public static final long ParseTime(final String time) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static final long ParseTime(final String time) throws ParseException { final String[] timeString = time.split(":"); int hour = Integer.parseInt(timeString[0]), minute = Integer.parseInt(timeString[1]), second = Integer.parseInt(timeString[2]); Calendar now = new GregorianCalendar(); now.set(Calendar.HOUR_OF_DAY, hour); now.set(Calendar.MINUTE, minute); now.set(Calendar.SECOND, second); return now.getTimeInMillis(); }/*from w w w . j ava2 s. c om*/ }