/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) return cachedDate; String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (formatCache) { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } } return newDate; }
/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) { return cachedDate; } String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } return newDate; }
/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) { return cachedDate; } String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (formatCache) { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } } return newDate; }
/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) { return cachedDate; } String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (formatCache) { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } } return newDate; }
/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) return cachedDate; String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (formatCache) { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } } return newDate; }
/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) return cachedDate; String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (formatCache) { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } } return newDate; }
/** * Get the HTTP format of the specified date. */ public static final String formatDate (long value, DateFormat threadLocalformat) { Long longValue = new Long(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) return cachedDate; String newDate = null; Date dateValue = new Date(value); if (threadLocalformat != null) { newDate = threadLocalformat.format(dateValue); updateFormatCache(longValue, newDate); } else { synchronized (formatCache) { synchronized (format) { newDate = format.format(dateValue); } updateFormatCache(longValue, newDate); } } return newDate; }
/** * Get the HTTP format of the specified date. * @param value The date * @return the HTTP date */ public static final String formatDate(long value) { Long longValue = Long.valueOf(value); String cachedDate = formatCache.get(longValue); if (cachedDate != null) { return cachedDate; } String newDate = FORMAT_RFC5322.format(new Date(value)); updateFormatCache(longValue, newDate); return newDate; }