Package de.willuhn.io

Class ZipExtractor


  • public class ZipExtractor
    extends AbstractZipSupport
    Hilfklasse zum Entpacken von ZIP-Archiven.
    Author:
    willuhn
    • Constructor Summary

      Constructors 
      Constructor Description
      ZipExtractor​(java.util.zip.ZipFile zip)
      ct.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void extract​(java.io.File targetDirectory)
      Entpackt das ZIP-File in das angegebene Verzeichnis.
      • Methods inherited from class java.lang.Object

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

      • ZipExtractor

        public ZipExtractor​(java.util.zip.ZipFile zip)
        ct.
        Parameters:
        zip - das zu entpackende ZIP-File. Das Zip-File wird nach dem Entpacken automatisch geschlossen. Hierbei wird dessen close()-Methode aufgerufen.
    • Method Detail

      • extract

        public void extract​(java.io.File targetDirectory)
                     throws java.io.IOException
        Entpackt das ZIP-File in das angegebene Verzeichnis. Bereits existierende Dateien/Verzeichnisse werden nur dann ueberschrieben, wenn sie neuer sind.
        Parameters:
        targetDirectory - Ziel-Verzeichnis. Es wird automatisch angelegt, wenn es noch nicht existiert.
        Throws:
        java.io.IOException