Class JarRepack


  • public class JarRepack
    extends Object
    This class allow to repackage a jar file.
    Since:
    1.0
    Author:
    Laurent Jourdren
    • Constructor Detail

      • JarRepack

        public JarRepack​(File inFile,
                         File outFile)
                  throws IOException
        Public constructor.
        Parameters:
        inFile - the source jar file to repackage
        outFile - the path to the new repackaged file
        Throws:
        IOException - if an error occurs while opening the source jar file
    • Method Detail

      • addFile

        public void addFile​(File file,
                            String destDir)
                     throws IOException
        Add a file to the jar file.
        Parameters:
        file - file to add
        destDir - destination in the jar file
        Throws:
        IOException - if an error occurs while adding the file
      • close

        public void close()
                   throws IOException
        Close the repackaged file.
        Throws:
        IOException - if an error occurs while closing the repackaged file