org.codehaus.plexus.util
Class Expand

java.lang.Object
  extended byorg.codehaus.plexus.util.Expand

public class Expand
extends java.lang.Object

Unzip a file.

Since:
Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" name="unwar"
Version:
$Id: Expand.java 6695 2007-07-28 12:03:30Z hboutemy $
Author:
[email protected], Stefan Bodewig, Magesh Umasankar

Constructor Summary
Expand()
           
 
Method Summary
 void execute()
          Do the work.
protected  void expandFile(java.io.File srcF, java.io.File dir)
          Description of the Method
protected  void extractFile(java.io.File srcF, java.io.File dir, java.io.InputStream compressedInputStream, java.lang.String entryName, java.util.Date entryDate, boolean isDirectory)
          Description of the Method
 void setDest(java.io.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(java.io.File s)
          Set the path to zip-file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expand

public Expand()
Method Detail

execute

public void execute()
             throws java.lang.Exception
Do the work.

Throws:
java.lang.Exception - Thrown in unrecoverable error.

expandFile

protected void expandFile(java.io.File srcF,
                          java.io.File dir)
                   throws java.lang.Exception
Description of the Method

Throws:
java.lang.Exception

extractFile

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

Throws:
java.lang.Exception

setDest

public void setDest(java.io.File d)
Set the destination directory. File will be unzipped into the destination directory.

Parameters:
d - Path to the directory.

setSrc

public void setSrc(java.io.File s)
Set the path to zip-file.

Parameters:
s - Path to zip-file.

setOverwrite

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



Copyright © 2001-2008 Codehaus. All Rights Reserved.