public static synchronized FastDateFormat getInstance
        (String pattern, TimeZone timeZone, Locale locale,
         DateFormatSymbols symbols)
        throws IllegalArgumentException
    {
        Object key = pattern;

        if (timeZone != null) {
            key = new Pair(key, timeZone);
        }
        if (locale != null) {
            key = new Pair(key, locale);
        }
        if (symbols != null) {
            key = new Pair(key, symbols);
        }

        FastDateFormat format = cInstanceCache.get(key);
        if (format == null) {
            if (locale == null) {
                locale = Locale.getDefault();
            }
            if (symbols == null) {
                symbols = new DateFormatSymbols(locale);
            }
            format = new FastDateFormat(pattern, timeZone, locale, symbols);
            cInstanceCache.put(key, format);
        }
        return format;
    }
@param pattern {@link java.text.SimpleDateFormat} compatible pattern
@param timeZone optional time zone, overrides time zone of formatted
date
@param locale optional locale, overrides system locale
@param symbols optional date format symbols, overrides symbols for
provided locale
@return the fast date format
xmppserver/src/main/java/org/jivesoftware/util/FastDateFormat.java