You forgot to call zos.closeEntry () after each item is written, at the end of the for loop. And, as already noted, you did not close your ZipOutputStream.
I don't think you need to call entry.setSize () as well.
Otherwise, this should work.
Jamie
source share