JAVA¶ÁÈ¡PPTÎļþ
import java.io.InputStream;
import org.apache.lucene.document.Document;
import org.apache.poi.hslf.HSLFSlideShow;
import org.apache.poi.hslf.model.TextRun;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.usermodel.SlideShow;
public Document getDocument(Index index, String url, String title, InputStream is)
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<slides.length;i++){
TextRun[] t = slides[i].getTextRuns();//ΪÁËÈ¡µÃ»ÃµÆÆ¬µÄÎÄ×ÖÄÚÈÝ£¬½¨Á¢TextRun
for(int j=0;j<t.length;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;
}
Ïà¹ØÎĵµ£º
finalµÄ×÷ÓÃËæ×ÅËùÐÞÊεÄÀàÐͶø²»Í¬
1¡¢finalÐÞÊÎÀàÖеÄÊôÐÔ»òÕß±äÁ¿
ÎÞÂÛÊôÐÔÊÇ»ù±¾ÀàÐÍ»¹ÊÇÒýÓÃÀàÐÍ£¬finalËùÆðµÄ×÷Óö¼ÊDZäÁ¿ÀïÃæ´æ·ÅµÄ“Öµ”²»Äܱ䡣
&n ......
Ò»¡¢
Java
»ù´¡
µÚ
01
Ì⣺
×÷ÓÃÓò
public,private,protected,
ÒÔ¼°²»Ð´Ê±µÄÇø±ð
µÚ
02
Ì⣺
Anonymous Inner Class (
ÄäÃûÄÚ²¿Àà
)
ÊÇ·ñ¿ÉÒÔ
extends(
¼Ì³Ð
)
ÆäËüÀ࣬ÊÇ·ñ¿ÉÒÔ
implements(
ʵÏÖ
......
public class Calendar {
/**
* Ö±½ÓµÄ¿ÉÒԲ鿴Ч¹û
* @param args
*/
public static void main(String[] args) {
int year=input.nextInt();//Äê
int month=input.nextInt();//ÔÂ
int yearday=0;//Äê×ÜÌìÊý
//¼ ......
public int ExecProcAdd()
{
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedu ......