本文整理汇总了Java中com.drew.metadata.MetadataException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java MetadataException.printStackTrace方法的具体用法?Java MetadataException.printStackTrace怎么用?Java MetadataException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.drew.metadata.MetadataException
的用法示例。
在下文中一共展示了MetadataException.printStackTrace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDateValue
import com.drew.metadata.MetadataException; //导入方法依赖的package包/类
/**
* Get a Date type value out of the exif dir.
*
* @param dir
* @return
*/
public Date getDateValue(com.drew.metadata.Directory dir)
{
Date result = null;
if (dir.containsTag(exifTag))
try
{
result = dir.getDate(exifTag);
}
catch (MetadataException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
示例2: getImageCreationDate
import com.drew.metadata.MetadataException; //导入方法依赖的package包/类
/**
* Extracts from the given EXIF meta-data the date and time the picture was taken.
* @param ed the EXIF meta-data
* @return the date and time the picture was taken
*/
private Date getImageCreationDate(ExifDirectory ed) {
try {
if (ed.containsTag(ExifDirectory.TAG_DATETIME_ORIGINAL)) {
Date imageDate = ed.getDate(ExifDirectory.TAG_DATETIME_ORIGINAL);
return imageDate;
}
} catch (MetadataException e) {
e.printStackTrace();
showError("An error occurred during EXIF date reading.\nError is "+e.getMessage()+".");
}
return null;
}