ASF Bugzilla – Attachment 8798 Details for
Bug 24211
IOException reading Excel-files included in an ZIP-file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for HeaderBlockReader.java
IOExceptionReadingZIPFile1.txt (text/plain), 1.00 KB, created by
Volker Tirjan
on 2003-10-29 10:10:49 UTC
(
hide
)
Description:
Patch for HeaderBlockReader.java
Filename:
MIME Type:
Creator:
Volker Tirjan
Created:
2003-10-29 10:10:49 UTC
Size:
1.00 KB
patch
obsolete
>--- HeaderBlockReaderORIG.java Wed Apr 30 07:38:58 2003 >+++ HeaderBlockReader.java Wed Oct 29 10:43:11 2003 >@@ -105,6 +105,22 @@ > { > _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; > int byte_count = stream.read(_data); >+ /// XXX 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. >+ // The original source worked fine up to the point of reading Excel-files >+ // contained in a ZIP-file. >+ while (byte_count!=-1 && byte_count < POIFSConstants.BIG_BLOCK_SIZE) { >+ int k = stream.read(_data, byte_count, POIFSConstants.BIG_BLOCK_SIZE-byte_count); >+ if (k==-1) { >+ break; >+ } else { >+ byte_count += k; >+ } >+ } >+ /// XXX Patch >+ > > if (byte_count != POIFSConstants.BIG_BLOCK_SIZE) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24211
: 8798 |
8799