java读取word内容

一个简单的读取word内容的方法,只限读取文本,需要tm-extractors-0.4.jar

public static void main(String args[]) throws Exception {
		new ResaveDoc().readText();
	}

	public void readText() throws Exception {
		FileInputStream in = new FileInputStream("C://test.doc ");
		WordExtractor extractor = new WordExtractor();
		String str = extractor.extractText(in);
		System.out.println(str);
	}


你可能感兴趣的:(java读取word内容)