I have to write a spring job, which should fetch multiple records from database ,create a zip file using those records and insert the zip file entry, back into a separate database table. This zip file will be transferred to some other application, later on. Problem is that there is a 10 MB restriction on data transfer so i need to make a zip file with max size of 10 MB. I thought of using chunk of 500 records. Now suppose 10 MB limit reaches by adding 475 records into the zip file, what should i do with remaining 25 records?
It's exactly the same and completely different as this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!