Package org.pf4j.util

Class Unzip


  • public class Unzip
    extends java.lang.Object
    This class extracts the content of the plugin zip into a directory. It's a class for only the internal use.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File destination
      Holds the destination directory.
      private static org.slf4j.Logger log  
      private java.io.File source
      Holds path to zip file.
    • Constructor Summary

      Constructors 
      Constructor Description
      Unzip()  
      Unzip​(java.io.File source, java.io.File destination)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void extract()
      Extract the content of zip file (source) to destination directory.
      void setDestination​(java.io.File destination)  
      void setSource​(java.io.File source)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private static final org.slf4j.Logger log
      • destination

        private java.io.File destination
        Holds the destination directory. File will be unzipped into the destination directory.
      • source

        private java.io.File source
        Holds path to zip file.
    • Constructor Detail

      • Unzip

        public Unzip()
      • Unzip

        public Unzip​(java.io.File source,
                     java.io.File destination)
    • Method Detail

      • setSource

        public void setSource​(java.io.File source)
      • setDestination

        public void setDestination​(java.io.File destination)
      • extract

        public void extract()
                     throws java.io.IOException
        Extract the content of zip file (source) to destination directory. If destination directory already exists it will be deleted before.
        Throws:
        java.io.IOException