Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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;
}


Ïà¹ØÎĵµ£º

Java ¼¯ºÏ¿ò¼Ü(Collection)ºÍÊý×éµÄÅÅÐò


¡¡¡¡¸ù¾ÝÔ¼¶¨£¬ÔÚʹÓÃjava±à³ÌµÄʱºòÓ¦¾¡¿ÉÄܵÄʹÓÃÏÖÓеÄÀà¿â£¬µ±È»ÄãÒ²¿ÉÒÔ×Ô¼º±àдһ¸öÅÅÐòµÄ·½·¨£¬»òÕß¿ò¼Ü£¬µ«ÊÇÓм¸¸öÈËÄÜдµÃ±ÈJDKÀïµÄ»¹ÒªºÃ ÄØ£¿Ê¹ÓÃÏÖÓеÄÀàµÄÁíÒ»¸öºÃ´¦ÊÇ´úÂëÒ×ÓÚÔĶÁºÍά»¤£¬ÕâÆªÎÄÕÂÖ÷Òª½²µÄÊÇÈçºÎʹÓÃÏÖÓеÄÀà¿â¶ÔÊý×éºÍ¸÷ÖÖCollectionÈÝÆ÷½øÐÐÅÅÐò£¬(ÎÄÕÂÖеÄÒ» ²¿·ÖÀý×ÓÀ´×Ô¡¶Java Devel ......

JAVAÖеķ´Éä»úÖÆÏê½â

JAVA·´Éä»úÖÆ
    JAVA·´Éä»úÖÆÊÇÔÚÔËÐÐ״̬ÖУ¬¶ÔÓÚÈÎÒâÒ»¸öÀ࣬¶¼Äܹ»ÖªµÀÕâ¸öÀàµÄËùÓÐÊôÐԺͷ½·¨£»¶ÔÓÚÈÎÒâÒ»¸ö¶ÔÏ󣬶¼Äܹ»µ÷ÓÃËüµÄÈÎÒâÒ»¸ö·½·¨£»ÕâÖÖ¶¯Ì¬»ñÈ¡µÄÐÅÏ¢ÒÔ¼°¶¯Ì¬µ÷ÓöÔÏóµÄ·½·¨µÄ¹¦ÄܳÆÎªjavaÓïÑԵķ´Éä»úÖÆ¡£
Java·´Éä»úÖÆÖ÷ÒªÌṩÁËÒÔϹ¦ÄÜ£º ÔÚÔËÐÐʱÅжÏÈÎÒâÒ»¸ö¶ÔÏóËùÊô ......

java¶àÏ̱߳à³ÌÒªµã(¶þ)

4¡¢  TimerºÍTimerTaskµÄʹÓÃ
       TimerÊÇÒ»ÖÖ¶¨Ê±Æ÷¹¤¾ß£¬ÓÃÀ´ÔÚÒ»¸öºǫ́Ï̼߳ƻ®Ö´ÐÐÖ¸¶¨ÈÎÎñ£¬ÕâЩÈÎÎñ¿ÉÒÔ±»Ö´ÐÐÒ»´Î£¬Ò²¿ÉÒÔ±»¶¨ÆÚÖ´ÐС£Ã¿¸ö Timer ¶ÔÏó¶ÔÓ¦Ò»¸öºǫ́Ị̈߳¬Ë³ÐòµØÖ´ÐÐËùÓмÆÊ±Æ÷ÈÎÎñ¡£Èç¹ûÍê³Éij¸ö¼ÆÊ±Æ÷ÈÎÎñµÄʱ¼äÌ«³¤£¬ÄÇôËü»á“¶ÀÕ¼”¼ÆÊ±Æ÷µÄÈ ......

»ùÓÚ Java µÄ½çÃæ²¼¾Ö DSL µÄÉè¼ÆÓëʵÏÖ


http://www.ibm.com/developerworks/cn/java/j-lo-uidsl/index.html
»ùÓÚ Java µÄ½çÃæ²¼¾Ö DSL µÄÉè¼ÆÓëʵÏÖ
 
 
 
¼¶±ð£º Öм¶
Ëï Ãù
µË »Ô

2007 Äê 9 ÔÂ 11 ÈÕ
½çÃæÉè¼ÆÓ¦¸ÃÊÇÒ»Ïî³äÂú´´ÔìÐÔ¡¢¸»ÓÐÀÖȤµÄ¹¤×÷£¬µ«ÊÇÈ´ÍùÍù±»ÈÏΪ·Ç³£µÄ¿ÝÔïºÍ·±Ëö¡£¾¿ÆäÔ­Òò£¬ÊÇÒòΪ½çÃæ²¼¾ÖÁìÓòËù²ÉÓõÄÃè ......

javaµÃµ½µ±Ç°Ê±¼ä

javaµÃµ½µ±Ç°Ê±¼ä
Java»ù´¡ 2009-06-02 21:34:18 ÔĶÁ1289 ÆÀÂÛ0 ×ֺţº´óÖÐС
        //String nowTime=new SimpleDateFormat("yyyyMMddHHmm").format(new java.util.Date());
        //System.out.println(nowTime);
import java.text.Sim ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ