01: package org.textmining.text.extraction;
02:
03: import java.io.*;
04:
05: /**
06: * Title:
07: * Description:
08: * Copyright: Copyright (c) 2003
09: * Company:
10: * @author
11: * @version 1.0
12: */
13:
14: class Test {
15:
16: public Test() {
17: }
18:
19: public static void main(String[] args) {
20: try {
21: WordExtractor extractor = new WordExtractor();
22: String s = extractor.extractText(new FileInputStream(
23: args[0]));
24: System.out.println(s);
25: OutputStreamWriter out = new OutputStreamWriter(
26: new FileOutputStream("C:\\test.txt"), "UTF-16LE");
27: out.write(s);
28: out.flush();
29: out.close();
30: } catch (Exception e) {
31: e.printStackTrace();
32: }
33: }
34: }
|