Here you can find the source of time2IntMillis(String timestr)
public static int time2IntMillis(String timestr)
//package com.java2s; public class Main { public static int time2IntMillis(String timestr) { String[] times = timestr.split(":"); if (times.length == 1) { return Integer.parseInt(times[0]) * 1000; } else if (times.length == 2) { return (Integer.parseInt(times[0]) * 60 + Integer .parseInt(times[1])) * 1000; } else if (times.length == 3) { // return (Integer.parseInt(times[0])*3600+Integer.parseInt(times[1])*60+Integer.parseInt(times[2]))*100;//NumberFormatException: Invalid int: "" return 0; } else {/* w w w .j a v a 2 s.c om*/ return 0; } } }