org.apache.maven.util
Class Expand

java.lang.Object
  extended byorg.apache.maven.util.Expand

public class Expand
extends java.lang.Object

Unzip a file.

Since:
Ant 1.1
Author:
costin@dnt.ro, Stefan Bodewig, Magesh Umasankar

Constructor Summary
Expand()
           
 
Method Summary
 void execute()
          Do the work.
protected  void expandFile()
          Expand a file.
protected  void extractFile(java.io.InputStream compressedInputStream, java.lang.String entryName, java.util.Date entryDate, boolean isDirectory)
          Extract a file.
 void setDest(java.io.File d)
          Set the destination directory.
 void setFileUtils(org.apache.tools.ant.util.FileUtils utils)
           
 void setOverwrite(boolean shouldOverwrite)
          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.io.IOException
Do the work.

Throws:
java.io.IOException - If an error occurs.

expandFile

protected void expandFile()
                   throws java.io.IOException
Expand a file.

Throws:
java.io.IOException

extractFile

protected void extractFile(java.io.InputStream compressedInputStream,
                           java.lang.String entryName,
                           java.util.Date entryDate,
                           boolean isDirectory)
                    throws java.io.IOException
Extract a file.

Parameters:
compressedInputStream - The input stream.
entryName - The entry name.
entryDate - The entry date.
isDirectory - Flag indicating if is directory.
Throws:
java.io.IOException - If an error occurs while attempting to extract the file.

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 shouldOverwrite)
Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?

Parameters:
shouldOverwrite - true to indicate that files should be overwritten, otherwise false.

setFileUtils

public void setFileUtils(org.apache.tools.ant.util.FileUtils utils)
Parameters:
utils -


Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.