public synchronized String format(long inDate){
  long seconds=inDate / 1000;
  if (seconds < _lastSeconds || _lastSeconds > 0 && seconds > _lastSeconds + __hitWindow) {
    Date d=new Date(inDate);
    return _tzFormat.format(d);
  }
  if (_lastSeconds == seconds)   return _lastResult;
  Date d=new Date(inDate);
  long minutes=seconds / 60;
  if (_lastMinutes != minutes) {
    _lastMinutes=minutes;
    _secFormatString=_minFormat.format(d);
    int i=_secFormatString.indexOf("ss");
    int l=2;
    _secFormatString0=_secFormatString.substring(0,i);
    _secFormatString1=_secFormatString.substring(i + l);
  }
  _lastSeconds=seconds;
  StringBuilder sb=new StringBuilder(_secFormatString.length());
  sb.append(_secFormatString0);
  int s=(int)(seconds % 60);
  if (s < 10)   sb.append('0');
  sb.append(s);
  sb.append(_secFormatString1);
  _lastResult=sb.toString();
  return _lastResult;
}

public synchronized String format ( long inDate ) { long seconds = inDate / 1000 ; if ( seconds < _lastSeconds || _lastSeconds > 0 && seconds > _lastSeconds + __hitWindow ) { Date d = new Date ( inDate ) ; return _tzFormat . format ( d ) ; } if ( _lastSeconds == seconds ) return _lastResult ; Date d = new Date ( inDate ) ; long minutes = seconds / 60 ; if ( _lastMinutes != minutes ) { _lastMinutes = minutes ; _secFormatString = _minFormat . format ( d ) ; int i = _secFormatString . indexOf ( "ss" ) ; int l = 2 ; _secFormatString0 = _secFormatString . substring ( 0 , i ) ; _secFormatString1 = _secFormatString . substring ( i + l ) ; } _lastSeconds = seconds ; StringBuilder sb = new StringBuilder ( _secFormatString . length ( ) ) ; sb . append ( _secFormatString0 ) ; int s = ( int ) ( seconds % 60 ) ; if ( s < 10 ) sb . append ( '0' ) ; sb . append ( s ) ; sb . append ( _secFormatString1 ) ; _lastResult = sb . toString ( ) ; return _lastResult ; }
format a date according to our stored formatter .
