本文整理匯總了Java中java.util.UnknownFormatConversionException.initCause方法的典型用法代碼示例。如果您正苦於以下問題:Java UnknownFormatConversionException.initCause方法的具體用法?Java UnknownFormatConversionException.initCause怎麽用?Java UnknownFormatConversionException.initCause使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.util.UnknownFormatConversionException
的用法示例。
在下文中一共展示了UnknownFormatConversionException.initCause方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getExpiry
import java.util.UnknownFormatConversionException; //導入方法依賴的package包/類
/**
* Get the time at which the leased subscription will expire, or has expired.
*
* @return The expiry date
*/
public Date getExpiry()
{
String dateTime = getFieldValue(SubscribeOptionFields.expire);
try
{
return XmppDateTime.parseDate(dateTime);
}
catch (ParseException e)
{
UnknownFormatConversionException exc = new UnknownFormatConversionException(dateTime);
exc.initCause(e);
throw exc;
}
}
示例2: getExpiry
import java.util.UnknownFormatConversionException; //導入方法依賴的package包/類
/**
* Get the time at which the leased subscription will expire, or has expired.
*
* @return The expiry date
*/
public Date getExpiry()
{
String dateTime = getFieldValue(SubscribeOptionFields.expire);
try
{
return format.parse(dateTime);
}
catch (ParseException e)
{
UnknownFormatConversionException exc = new UnknownFormatConversionException(dateTime);
exc.initCause(e);
throw exc;
}
}
示例3: getExpiry
import java.util.UnknownFormatConversionException; //導入方法依賴的package包/類
/**
* Get the time at which the leased subscription will expire, or has expired.
*
* @return The expiry date
*/
public Date getExpiry()
{
String dateTime = getFieldValue(SubscribeOptionFields.expire);
try
{
return StringUtils.parseDate(dateTime);
}
catch (ParseException e)
{
UnknownFormatConversionException exc = new UnknownFormatConversionException(dateTime);
exc.initCause(e);
throw exc;
}
}
示例4: getExpiry
import java.util.UnknownFormatConversionException; //導入方法依賴的package包/類
/**
* Get the time at which the leased subscription will expire, or has
* expired.
*
* @return The expiry date
*/
public Date getExpiry() {
String dateTime = getFieldValue(SubscribeOptionFields.expire);
try {
return format.parse(dateTime);
} catch (ParseException e) {
UnknownFormatConversionException exc = new UnknownFormatConversionException(
dateTime);
exc.initCause(e);
throw exc;
}
}