| org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.Expand
All known Subclasses: org.apache.tools.ant.taskdefs.Untar,
Expand | public class Expand extends Task (Code) | | Unzip a file.
since: Ant 1.1 |
Method Summary | |
public void | add(ResourceCollection rc) Add a resource collection. | public void | add(FileNameMapper fileNameMapper) | public void | addFileset(FileSet set) | public void | addPatternset(PatternSet set) Add a patternset. | public Mapper | createMapper() Defines the mapper to map source entries to destination files. | public void | execute() Do the work. | protected void | expandFile(FileUtils fileUtils, File srcF, File dir) This method is to be overridden by extending unarchival tasks. | protected void | expandResource(Resource srcR, File dir) This method is to be overridden by extending unarchival tasks. | protected void | extractFile(FileUtils fileUtils, File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory, FileNameMapper mapper) | protected FileNameMapper | getMapper() | public void | setDest(File d) Set the destination directory. | public void | setEncoding(String encoding) Sets the encoding to assume for file names and comments. | public void | setOverwrite(boolean b) | public void | setSrc(File s) Set the path to zip-file. |
ERROR_MULTIPLE_MAPPERS | final public static String ERROR_MULTIPLE_MAPPERS(Code) | | Error message when more that one mapper is defined
|
add | public void add(ResourceCollection rc)(Code) | | Add a resource collection.
Parameters: rc - a resource collection. since: Ant 1.7 |
add | public void add(FileNameMapper fileNameMapper)(Code) | | A nested filenamemapper
Parameters: fileNameMapper - the mapper to add since: Ant 1.6.3 |
addFileset | public void addFileset(FileSet set)(Code) | | Add a fileset
Parameters: set - a file set |
addPatternset | public void addPatternset(PatternSet set)(Code) | | Add a patternset.
Parameters: set - a pattern set |
createMapper | public Mapper createMapper() throws BuildException(Code) | | Defines the mapper to map source entries to destination files.
a mapper to be configured exception: BuildException - if more than one mapper is defined since: Ant1.7 |
expandFile | protected void expandFile(FileUtils fileUtils, File srcF, File dir)(Code) | | This method is to be overridden by extending unarchival tasks.
Parameters: fileUtils - the fileUtils Parameters: srcF - the source file Parameters: dir - the destination directory |
expandResource | protected void expandResource(Resource srcR, File dir)(Code) | | This method is to be overridden by extending unarchival tasks.
Parameters: srcR - the source resource Parameters: dir - the destination directory |
extractFile | protected void extractFile(FileUtils fileUtils, File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory, FileNameMapper mapper) throws IOException(Code) | | extract a file to a directory
Parameters: fileUtils - a fileUtils object Parameters: srcF - the source file Parameters: dir - the destination directory Parameters: compressedInputStream - the input stream Parameters: entryName - the name of the entry Parameters: entryDate - the date of the entry Parameters: isDirectory - if this is true the entry is a directory Parameters: mapper - the filename mapper to use throws: IOException - on error |
getMapper | protected FileNameMapper getMapper()(Code) | | get a mapper for a file
a filenamemapper for a file |
setDest | public void setDest(File d)(Code) | | Set the destination directory. File will be unzipped into the
destination directory.
Parameters: d - Path to the directory. |
setEncoding | public void setEncoding(String encoding)(Code) | | Sets the encoding to assume for file names and comments.
Set to native-encoding if you want your
platform's native encoding, defaults to UTF8.
Parameters: encoding - the name of the character encoding since: Ant 1.6 |
setOverwrite | public void setOverwrite(boolean b)(Code) | | Should we overwrite files in dest, even if they are newer than
the corresponding entries in the archive?
Parameters: b - a boolean value |
setSrc | public void setSrc(File s)(Code) | | Set the path to zip-file.
Parameters: s - Path to zip-file. |
|
|