Hi Roedy,
I thought perhaps you might be interested in the error msg and stack trace
for your error messages page. This one certainly had me stumped for quite a
while. Thankyou also for all your help directly and indirectly via 'the
glossary'. I have also included the code used to generate the zip files.
Forgive me mailing it here, i am currently also a victim of the 'virus
storm'.
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at ClientSide.uncompress(ClientSide.java:76)
at ClientSide.<init>(ClientSide.java:42)
at ClientSide.main(ClientSide.java:1
private File compress(File f) throws Exception {
int entryCount = 0;
File toReturn = null;
try {
toReturn = new File(f.getName() + ".comp");
ZipOutputStream zos = new ZipOutputStream(new
FileOutputStream(toReturn));
FileInputStream in = new FileInputStream(f);
ZipEntry ze;
byte[] buffer = new byte[512];
while(in.read(buffer) != EOF) {
ze = new ZipEntry("" + ++entryCount);
// System.out.println("Going around again. entryCount: " +
entryCount);
zos.putNextEntry(ze);
zos.write(buffer);
}
return toReturn;
} catch( Exception exc ) {
exc.printStackTrace();
throw new Exception("Exception occurred in method send.");
}
}
cheers, Andrew.
"Roedy Green" <> wrote in message
news:...
> On Mon, 22 Sep 2003 11:47:09 GMT, "Andrew Tucker"
> <> wrote or quoted :
>
> >ZipInputStream zin = new ZipInputStream(new FileInputStream(f));
>
> Try using ZipFile rather than ZipInputStream.
>
> See http://mindprod.com/jgloss/zip.html for why
>
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming.
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.