Problem with uploading ZIP files..........through servlet using a java client...
i am trying to upload a Zip file from a client program through a Servlet. I am able to upload but the files are correpted. I checked the size of the uploaded file. its same as the orginal file.. i dont know what's the problem.. following is the code in my servlet that reads the file and saves
BufferedReader buffRead = new BufferedReader(new InputStreamReader(InStream));
DataOutputStream dos = new DataOutputStream(new FileOutputStream(sFileName));
while ((i = buffRead.read())!=-1)
Any suggessions pls.. and one more thing if I try this for text files then its uploading fine...