whao... it works! I spent days to figure this out. I love this forum. Thanks James.
Well, now, I have a relatively smaller problem, I am loosing all the internal directory structure when I chop off the root directory name while entering the files into the zip, and all my content gets into the one folder, which is downloaded as a zip file. I want to maintain my directory structure of downloaded zip. I get from API
doc that ZipOutputStream considers an entry as a directory if the name ends with "/" character. So, that way I can create nested folders. Now, my question is how do I point a particular file to go into its own directory or sub-directory. (At the time of inserting, I have the information of the directory it belongs to.)
FYI, the server, where the original folders are kept for zipping is a Linux machine. And the client machine can be either Windows or Mac. So, I have to consider that while thinking of root directories and absolute paths.