org.apache.tools.ant.taskdefs
Class Untar

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.Expand
                    |
                    +--org.apache.tools.ant.taskdefs.Untar

public class Untar
extends Expand

Untar a file.

For JDK 1.1 "last modified time" field is set to current time instead of being carried from the archive file.

PatternSets are used to select files to extract from the archive. If no patternset is used, all files are extracted.

FileSet>s may be used to select archived files to perform unarchival upon.

File permissions will not be restored on extracted files.

The untar task recognizes the long pathname entries used by GNU tar.

Since:
Ant 1.1

Nested Class Summary
static class Untar.UntarCompressionMethod
          Valid Modes for Compression attribute to Untar Task
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
Untar()
           
 
Method Summary
protected  void expandFile(FileUtils fileUtils, java.io.File srcF, java.io.File dir)
           
 void setCompression(Untar.UntarCompressionMethod method)
          Set decompression algorithm to use; default=none.
 void setEncoding(java.lang.String encoding)
          No encoding support in Untar.
 
Methods inherited from class org.apache.tools.ant.taskdefs.Expand
addFileset, addPatternset, execute, extractFile, setDest, setOverwrite, setSrc
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Untar

public Untar()
Method Detail

setCompression

public void setCompression(Untar.UntarCompressionMethod method)
Set decompression algorithm to use; default=none. Allowable values are

Parameters:
method - compression method

setEncoding

public void setEncoding(java.lang.String encoding)
No encoding support in Untar.

Overrides:
setEncoding in class Expand
Parameters:
encoding - not used
Throws:
BuildException - always
Since:
Ant 1.6

expandFile

protected void expandFile(FileUtils fileUtils,
                          java.io.File srcF,
                          java.io.File dir)
Overrides:
expandFile in class Expand
See Also:
Expand.expandFile(FileUtils, File, File)


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.