I am trying to create a zip archive in java. Every iteration adds some data to a ZipEntry and I wanted to flush the contents after every iteration ( due to server restart handling ).
But ZipOutputStream flush() does not work. i.e. contents are not pushed to the exact file. Only close() method pushes all data to the file. Any idea why this happens?
I saw somewhere that flush don't work when file is compressed. Is it true? And how to overcome that?