Hi there,
I have the following code that basically reads in a zip file on the local machine and sends the bytes to the http request when a user requests it:
The code runs fine on one machine (uses Java 1.5.0_02-b09 with Linux: 2.6.9-5.ELsmp ), but running the exact same code at a different machine (Java 1.4.2 Linux:2.6.9-5.0.3.ELhugemem) returns me with a corruped Zip file; the zip program says "missing 492150 bytes in Zip file"
Is anyone aware of anything in the code that is perhaps causing this OS/Java dependent error?
I have the following code that basically reads in a zip file on the local machine and sends the bytes to the http request when a user requests it:
Code:
response.setContentType("application/zip");
response.setHeader ("Content-Disposition", "attachment;filename=\"test.zip\"");
FileInputStream fis = new FileInputStream(filePath+"upnpLogs.zip");
int c;
while ( (c=fis.read()) != -1) {
out.write(c);
}
fis.close();
out.flush();
The code runs fine on one machine (uses Java 1.5.0_02-b09 with Linux: 2.6.9-5.ELsmp ), but running the exact same code at a different machine (Java 1.4.2 Linux:2.6.9-5.0.3.ELhugemem) returns me with a corruped Zip file; the zip program says "missing 492150 bytes in Zip file"
Is anyone aware of anything in the code that is perhaps causing this OS/Java dependent error?