DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24211>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24211 IOException reading Excel-files included in an ZIP-file Summary: IOException reading Excel-files included in an ZIP-file Product: POI Version: 2.0-pre3 Platform: PC URL: http://www.bundesbank.de OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: POIFS AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] POIFS tries to read in blocks of 512 bytes. This worked fine reading files from the filesystem, but causes trouble when reading Excel-files contained in a ZIP- file. ZipFile zip = new ZipFile(completePathToImportfile); Enumeration zipEntries = zip.entries(); ZipEntry zipEntry = (ZipEntry) zipEntries.nextElement(); InputStream innerFileStream = zip.getInputStream(zipEntry); POIFSFileSystem fs = new POIFSFileSystem(innerFileStream); // IOException occurs! Patch: The read() of java.io.InputStream does not guarantee to provide the full amount of requested bytes. It is necessary to repeat the reading until the full block is read or eof occured. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
