文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>java获取传真文件的页数

java获取传真文件的页数

时间:2010-03-02  来源:renmiaogen

public static int getTIFFPageNum(String srcPath) {
  File srcFile = new File(srcPath);
  InputStream fis = null;   try {
   fis = new FileInputStream(srcFile);
   TIFFDecodeParam decodeParam = new TIFFDecodeParam();
   ImageDecoder decoder = ImageCodec.createImageDecoder("TIFF", fis,
     decodeParam);
   return decoder.getNumPages();
  } catch (Exception e) {
   e.printStackTrace();
  } finally {
   try {
    if (null != fis) {
     fis.close();
    }
   } catch (Exception e) {
   }
  }
  return 0;
 }
相关阅读 更多 +
排行榜 更多 +
山地狂飙无广告版

山地狂飙无广告版

赛车竞速 下载
约战精灵再临bilibili版

约战精灵再临bilibili版

冒险解谜 下载
约战精灵再临正版手游

约战精灵再临正版手游

冒险解谜 下载