de.interactive_instruments.ShapeChange.Util
Class ZipHandler

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Util.ZipHandler

public class ZipHandler
extends Object

Author:
Johannes Echterhoff (echterhoff interactive-instruments de)

Constructor Summary
ZipHandler()
           
 
Method Summary
 void unzip(File zipfile, File directory)
          Unzips the contents of a zip file to a given directory.
 void zip(File directoryToZip, File toFile)
          Creates a zip file containing the files (actual files as well as sub directories) from a given directory, with relative file paths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipHandler

public ZipHandler()
Method Detail

unzip

public void unzip(File zipfile,
                  File directory)
           throws Exception
Unzips the contents of a zip file to a given directory.

Parameters:
zipfile -
directory -
Throws:
Exception

zip

public void zip(File directoryToZip,
                File toFile)
         throws Exception
Creates a zip file containing the files (actual files as well as sub directories) from a given directory, with relative file paths.

Parameters:
directoryToZip - Directory that shall be zipped.
toFile - File to zip to.
Throws:
IOException
Exception


Copyright © 2015. All rights reserved.