
byte[] buffer = new byte[totalBytesRead];
try{
FileOutputStream fos = new FileOutputStream(destFolder+emp_code+".zip");
ZipOutputStream zos = new ZipOutputStream(fos);
ZipEntry ze= new ZipEntry(destFolder+emp_code+".doc");
zos.putNextEntry(ze);
FileInputStream in1 = new FileInputStream(svefile);
int len;
while ((len = in1.read(buffer)) > 0) {
zos.write(buffer, 0, len);
}
in1.close();
zos.closeEntry();
//remember close it
zos.close();
}
catch(Exception e)
{
%>
<%
}
this is my code part getting an error "emp_code.doc"(specified file not found)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.