https://bz.apache.org/bugzilla/show_bug.cgi?id=62763
Bug ID: 62763 Summary: HWPFDocument(POIFSFileSystem pfilesystem) Constructor exception Product: POI Version: 4.0.0-FINAL Hardware: PC Status: NEW Severity: normal Priority: P2 Component: HWPF Assignee: dev@poi.apache.org Reporter: 986619...@qq.com Target Milestone: --- my code: content = "1111"; ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(content.getBytes()); String realPathFile = DIR_IN + "empty.doc"; POIFSFileSystem poifsFileSystem = new POIFSFileSystem(new FileInputStream(realPathFile)); poifsFileSystem.createOrUpdateDocument(byteArrayInputStream, "WordDocument"); HWPFDocument hwpfDocument = new HWPFDocument(poifsFileSystem); hwpfDocument.write(new FileOutputStream(DIR_OUT + outFileName)); hwpfDocument.close(); poifsFileSystem.close(); byteArrayInputStream.close(); console exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 11 at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:253) at org.apache.poi.hwpf.model.types.FibBaseAbstractType.fillFields(FibBaseAbstractType.java:95) at org.apache.poi.hwpf.model.FibBase.<init>(FibBase.java:43) at org.apache.poi.hwpf.HWPFDocumentCore.getEncryptionInfo(HWPFDocumentCore.java:255) at org.apache.poi.hwpf.HWPFDocumentCore.getDocumentEntryBytes(HWPFDocumentCore.java:327) at org.apache.poi.hwpf.HWPFDocumentCore.<init>(HWPFDocumentCore.java:169) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:193) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:177) at com.snoopy.poi.HTML2doc.main(HTML2doc.java:55) -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org