title: Java library to manipulate jar files
body: <p>Can anyone recommend a Java library to manipulate <strong>jar</strong> files? I am finding the facilities available at <strong>java.util.jar</strong> rather terse (or maybe I don't have some example code to look at). I am interested in things like:</p>
  
  <ol>
  <li>adding files to a <strong>jar</strong></li>
  <li>removing files from a <strong>jar</strong></li>
  <li>create a <strong>jar</strong> file from a folder</li>
  <li>deflate a <strong>jar</strong> file to a folder</li>
  <li>reading the contents of a <strong>jar entry</strong> (perhaps in memory, without having to deflate the <strong>jar</strong> on disk)</li>
  <li>creating a <strong>jar entry</strong> in memory without having to read from a file on disk.</li>
  <li>asking whether a <strong>jar</strong> file entry is a <strong>Manifest</strong> file or some other special file or not.</li>
  </ol>
  
  <p>If anyone can point to example code using either the <strong>java.util.jar</strong> or some other library that would help. In particular looking at the classes and methods of <strong>java.util.jar</strong> it is not clear to me how to read the contents of a particular Jar entry or even how to deflate the <strong>jar</strong> (without spawning an external process).</p>