KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > parse > msword > Test


1 package net.nutch.parse.msword;
2
3 import java.io.*;
4 /**
5  * Title:
6  * Description:
7  * Copyright: Copyright (c) 2003
8  * Company:
9  * @author
10  * @version 1.0
11  */

12
13 class Test
14 {
15
16   public Test()
17   {
18   }
19   public static void main(String JavaDoc[] args)
20   {
21     try
22     {
23       WordExtractor extractor = new WordExtractor();
24       String JavaDoc s = extractor.extractText(new FileInputStream(args[0]));
25       System.out.println(s);
26       //OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream("C:\\test.txt"), "UTF-16LE");
27
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream("./test.txt"));
28       out.write(s);
29       out.flush();
30       out.close();
31     }
32     catch (Exception JavaDoc e)
33     {
34       e.printStackTrace();
35     }
36   }
37 }
38
Popular Tags