eu.cedarsoft.utils
Class ZipExtractor

java.lang.Object
  extended by eu.cedarsoft.utils.ZipExtractor

public class ZipExtractor
extends java.lang.Object

Extracts ZIP files


Nested Class Summary
static interface ZipExtractor.Condition
          A condition can decide whether a given zip entry shall be extracted or not
static class ZipExtractor.InvertedCondition
          Inverts a condition
 
Constructor Summary
ZipExtractor(java.io.File zipFile)
          Creates a new extractor for the given file
 
Method Summary
 void extract(java.io.File destination)
          Extract the zip file to the given destination
 ZipExtractor.Condition getCondition()
          Returns the currently set condition
 void setCondition(ZipExtractor.Condition condition)
          Sets the (optional) condition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipExtractor

public ZipExtractor(@NotNull
                    java.io.File zipFile)
             throws java.io.FileNotFoundException
Creates a new extractor for the given file

Parameters:
zipFile - the zip file that will be extracted
Throws:
java.io.FileNotFoundException - if the file does not exist
Method Detail

extract

public void extract(@NotNull
                    java.io.File destination)
             throws java.io.IOException
Extract the zip file to the given destination

Parameters:
destination - the destination the file will be extracted to
Throws:
java.io.IOException

getCondition

@Nullable
public ZipExtractor.Condition getCondition()
Returns the currently set condition

Returns:
the condition

setCondition

public void setCondition(@Nullable
                         ZipExtractor.Condition condition)
Sets the (optional) condition

Parameters:
condition - the condition


Copyright © 2007 Cedarsoft. All Rights Reserved.