http://leiyuanguo.bokee.com/viewdiary.15510878.html
解决方案 »
- applicationContext.xml获取application.properties全局变量出错
- Hibernate3 的多对一级联操作。
- hibernate中给定年份 查询全年的记录?
- Socket 网络连接问题
- java生成触发器问题
- Struts tiles 中的奇怪问题,难道是BUG
- 求大神指教,关于JSP自定义标签doTag()的问题
- beanreader的用户如何将一个xml内容生成对象
- 各位程序员朋友们,谈谈你们的程序人生吧。(up有分)
- 请问有没有人在用SUNONE,包括S1Stuio4/S1App7
- struts和hibernate整合錯誤 請各位大俠幫忙看看!
- [求助]新手想学习java,请高手给予指点
http://www.haoxiai.net/bangongruanjian/powerpointjiaocheng/8432.html
throws DocCenterException {
StringBuffer content = new StringBuffer("");
try{
SlideShow ss = new SlideShow(new HSLFSlideShow(is));//is 为文件的InputStream,建立SlideShow
Slide[] slides = ss.getSlides();//获得每一张幻灯片
for(int i=0;i TextRun[] t = slides[i].getTextRuns();//为了取得幻灯片的文字内容,建立TextRun
for(int j=0;j content.append(t[j].getText());//这里会将文字内容加到content中去
}
content.append(slides[i].getTitle());
}
index.AddIndex(url, title, content.toString());
}catch(Exception ex){
System.out.println(ex.toString());
}
return null;
}
throws DocCenterException {
StringBuffer content = new StringBuffer("");
try{
SlideShow ss = new SlideShow(new HSLFSlideShow(is));//is 为文件的InputStream,建立SlideShow
Slide[] slides = ss.getSlides();//获得每一张幻灯片
for(int i=0;i TextRun[] t = slides[i].getTextRuns();//为了取得幻灯片的文字内容,建立TextRun
for(int j=0;j content.append(t[j].getText());//这里会将文字内容加到content中去
}
content.append(slides[i].getTitle());
}
index.AddIndex(url, title, content.toString());
}catch(Exception ex){
System.out.println(ex.toString());
}
return null;
}
好的代码 ,