|
Expand (Apache Ant API)
org.apache.tools.ant.taskdefs
Class Expand
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.Expand
- Direct Known Subclasses:
- Untar
- public class Expand
- extends Task
Unzip a file.
- Since:
- Ant 1.1
- Author:
- costin@dnt.ro
, Stefan Bodewig
, Magesh Umasankar
Method Summary |
void |
addFileset(FileSet set)
Add a fileset |
void |
addPatternset(PatternSet set)
Add a patternset |
void |
execute()
Do the work. |
protected void |
expandFile(FileUtils fileUtils,
java.io.File srcF,
java.io.File dir)
|
protected void |
extractFile(FileUtils fileUtils,
java.io.File srcF,
java.io.File dir,
java.io.InputStream compressedInputStream,
java.lang.String entryName,
java.util.Date entryDate,
boolean isDirectory)
|
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 org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Expand
public Expand()
execute
public void execute()
throws BuildException
- Do the work.
- Overrides:
execute in class Task
- Throws:
BuildException - Thrown in unrecoverable error.
expandFile
protected void expandFile(FileUtils fileUtils,
java.io.File srcF,
java.io.File dir)
extractFile
protected void extractFile(FileUtils fileUtils,
java.io.File srcF,
java.io.File dir,
java.io.InputStream compressedInputStream,
java.lang.String entryName,
java.util.Date entryDate,
boolean isDirectory)
throws java.io.IOException
java.io.IOException
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?
addPatternset
public void addPatternset(PatternSet set)
- Add a patternset
addFileset
public void addFileset(FileSet set)
- Add a fileset
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.
|