title: how to create java zip archives with a max file size limit
body: <p>I need to write an algorithm in java (for an android app) to read a folder containing more folders and each of those containing images and audio files so the structure is this: <code>mainDir/categorySubfolder/myFile1.jpg</code>  </p>
  
  <p>My problem is that I need to limit the size of the archive to 16mb and at runtime, create as many archives as needed to contain all my files from my main <code>mainDir</code> folder.  </p>
  
  <p>I tried several examples from the net and I read the java documentation but I can't manage to understand and put it all together the way I need it. Has someone done this before or has a link or an example for me?  </p>
  
  <p>I resolved the reading of the files with a recursive method but I can't write the logic for the zip creation.</p>
  
  <p>I'm open for suggestions or better a working example.</p>