Class JarHelper


  • public class JarHelper
    extends Object
    Provides utility services for jarring and unjarring files and directories. Note that a given instance of JarHelper is not threadsafe with respect to multiple jar operations.
    • Constructor Detail

      • JarHelper

        public JarHelper()
        Instantiates a new JarHelper.
    • Method Detail

      • jarDir

        public void jarDir​(File dirOrFile2Jar,
                           File destJar)
                    throws IOException
        Jars a given directory or single file into a JarOutputStream.
        Throws:
        IOException
      • unjarDir

        public void unjarDir​(File jarFile,
                             File destDir)
                      throws IOException
        Unjars a given jar file into a given directory.
        Throws:
        IOException
      • setVerbose

        public void setVerbose​(boolean b)