org.codehaus.plexus.util

Class Expand


public class Expand
extends java.lang.Object

Unzip a file.
Version:
$Id: Expand.java 6695 2007-07-28 12:03:30Z hboutemy $
Authors:
costin@dnt.ro
Stefan Bodewig
Magesh Umasankar
Since:
Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" name="unwar"

Method Summary

void
execute()
Do the work.
protected void
expandFile(File srcF, File dir)
Description of the Method
protected void
extractFile(File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory)
Description of the Method
void
setDest(File d)
Set the destination directory.
void
setOverwrite(boolean b)
Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?
void
setSrc(File s)
Set the path to zip-file.

Method Details

execute

public void execute()
            throws Exception
Do the work.

expandFile

protected void expandFile(File srcF,
                          File dir)
            throws Exception
Description of the Method

extractFile

protected void extractFile(File srcF,
                           File dir,
                           InputStream compressedInputStream,
                           String entryName,
                           Date entryDate,
                           boolean isDirectory)
            throws Exception
Description of the Method

setDest

public void setDest(File d)
Set the destination directory. File will be unzipped into the destination directory.
Parameters:
d - Path to the directory.

setOverwrite

public void setOverwrite(boolean b)
Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?

setSrc

public void setSrc(File s)
Set the path to zip-file.
Parameters:
s - Path to zip-file.