Here you can find the source of toTimeFormat(String _srcTime)
public static String toTimeFormat(String _srcTime)
//package com.java2s; public class Main { public static String toTimeFormat(String _srcTime) { if (_srcTime == null || _srcTime.length() != 4) return _srcTime; return _srcTime.substring(0, 2) + ":" + _srcTime.substring(2, 4); }// w w w . j a v a 2 s . co m }