net.sourceforge.jaulp.file.zip
Class Unzipper

java.lang.Object
  extended by net.sourceforge.jaulp.file.zip.Unzipper

public class Unzipper
extends java.lang.Object

The Class Unzipper.

Version:
1.0
Author:
Asterios Raptis

Constructor Summary
Unzipper()
          Instantiates a new unzipper.
Unzipper(java.util.zip.ZipFile zipFile, java.io.File toDir)
          Instantiates a new unzipper.
 
Method Summary
 void extractZipEntry(java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry target, java.io.File toDirectory)
          Extract zip entry.
 java.io.File getToDir()
          Returns the field toDir.
 java.util.zip.ZipFile getZipFile()
          Returns the field zipFile.
 void setToDir(java.io.File toDir)
          Sets the field toDir.
 void setZipFile(java.util.zip.ZipFile zipFile)
          Sets the field zipFile.
 void unzip()
          Unzip.
 void unzip(java.util.zip.ZipFile zipFile, java.io.File toDir)
          Unzip.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Unzipper

public Unzipper()
Instantiates a new unzipper.


Unzipper

public Unzipper(java.util.zip.ZipFile zipFile,
                java.io.File toDir)
Instantiates a new unzipper.

Parameters:
zipFile - the zip file
toDir - the to dir
Method Detail

extractZipEntry

public void extractZipEntry(java.util.zip.ZipFile zipFile,
                            java.util.zip.ZipEntry target,
                            java.io.File toDirectory)
                     throws java.io.IOException
Extract zip entry.

Parameters:
zipFile - the zip file
target - the target
toDirectory - the to directory
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getToDir

public java.io.File getToDir()
Returns the field toDir.

Returns:
The field toDir.

getZipFile

public java.util.zip.ZipFile getZipFile()
Returns the field zipFile.

Returns:
The field zipFile.

setToDir

public void setToDir(java.io.File toDir)
Sets the field toDir.

Parameters:
toDir - The toDir to set

setZipFile

public void setZipFile(java.util.zip.ZipFile zipFile)
Sets the field zipFile.

Parameters:
zipFile - The zipFile to set

unzip

public void unzip()
           throws java.io.IOException
Unzip.

Throws:
java.io.IOException - Signals that an I/O exception has occurred.

unzip

public void unzip(java.util.zip.ZipFile zipFile,
                  java.io.File toDir)
           throws java.io.IOException
Unzip.

Parameters:
zipFile - the zip file
toDir - the to dir
Throws:
java.io.IOException - Signals that an I/O exception has occurred.


Copyright © 2010. All Rights Reserved.