本文整理汇总了Java中org.jivesoftware.util.FastDateFormat.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java FastDateFormat.getInstance方法的具体用法?Java FastDateFormat.getInstance怎么用?Java FastDateFormat.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jivesoftware.util.FastDateFormat
的用法示例。
在下文中一共展示了FastDateFormat.getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OfflineMessageStore
import org.jivesoftware.util.FastDateFormat; //导入方法依赖的package包/类
/**
* Constructs a new offline message store.
*/
public OfflineMessageStore() {
super("Offline Message Store");
dateFormat = FastDateFormat.getInstance(JiveConstants.XMPP_DATETIME_FORMAT,
TimeZone.getTimeZone("UTC"));
dateFormatOld = FastDateFormat.getInstance(JiveConstants.XMPP_DELAY_DATETIME_FORMAT,
TimeZone.getTimeZone("UTC"));
sizeCache = CacheFactory.createCache("Offline Message Size");
}
示例2: getTime
import org.jivesoftware.util.FastDateFormat; //导入方法依赖的package包/类
/**
* Utility method to format time.
*
* @param time the time
* @param format ancilliary format parameter - allowed to be null
* @return the formatted string
*/
protected String getTime(final long time, final String format) {
if (null == format) {
return Long.toString(time);
}
else {
synchronized (m_date) {
if (null == m_simpleDateFormat) {
m_simpleDateFormat = FastDateFormat.getInstance(format);
}
m_date.setTime(time);
return m_simpleDateFormat.format(m_date);
}
}
}
示例3: AuditorImpl
import org.jivesoftware.util.FastDateFormat; //导入方法依赖的package包/类
public AuditorImpl(AuditManager manager) {
auditManager = manager;
dateFormat = FastDateFormat.getInstance("yyyyMMdd", TimeZone.getTimeZone("UTC"));
auditFormat = FastDateFormat.getInstance("MMM dd, yyyy hh:mm:ss:SSS a", JiveGlobals.getLocale());
}
示例4: UniqueFileStrategy
import org.jivesoftware.util.FastDateFormat; //导入方法依赖的package包/类
public UniqueFileStrategy(final File baseFile, String pattern) {
this(baseFile);
m_formatter = FastDateFormat.getInstance(pattern);
}