HWPFDocument中的异常

时间:2013-10-24 12:39:27

标签: java

import org.apache.poi.hwpf.HWPFDocument;

...

FileInputStream fistream=null;
try {
    fistream = new FileInputStream(basedir+File.separator+filename);
} catch (FileNotFoundException ex) {
    Logger.getLogger(MainGui.class.getName()).log(Level.SEVERE, null, ex);
}
HWPFDocument document=null;
try {
    document = new HWPFDocument(fistream);
} catch (IOException ex) {
    Logger.getLogger(MainGui.class.getName()).log(Level.SEVERE, null, ex);
}

System.out.println("Length of docment is :" + document.characterLength());
System.out.println(document.getTextTable());

我已经导入了poi jar,但它仍然以java.io.IOException: Invalid header signature; read 1688935826934608, expected -2226271756974174256

为例

0 个答案:

没有答案