From: Martin Gregorie on 26 Oct 2009 17:43 On Mon, 26 Oct 2009 14:04:12 -0700, Lew wrote: > > You get rid of them by not reading past the logical end of the file when > decompressing. > I think the OP made a more fundamental mistake: he ignored the possibility that he didn't fill the buffer that he wrote to the ZIP file and is consequently writing junk to his ZIP file. Obvious fix: Use the count of bytes read, which is returned by FileInputStream.read() in the rest of the program instead of buf.length. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
|
Pages: 1 Prev: abstract static methods (again) Next: unexpected result from Math.cos() |