Untar (Apache Ant API)
Class 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 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.

Ant 1.1
Stefan Bodewig
, Magesh Umasankar

Nested Class Summary
static class Untar.UntarCompressionMethod
          Valid Modes for Compression attribute to Untar Task
Field Summary
Fields inherited from class
description, location, target, taskName, taskType, wrapper
Fields inherited from class
Constructor Summary
Method Summary
protected  void expandFile(FileUtils fileUtils, srcF, dir)
 void setCompression(Untar.UntarCompressionMethod method)
          Set decompression algorithm to use; default=none.
Methods inherited from class
addFileset, addPatternset, execute, extractFile, setDest, setOverwrite, setSrc
Methods inherited from class
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
Methods inherited from class
getProject, setProject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Untar()
Method Detail


public void setCompression(Untar.UntarCompressionMethod method)
Set decompression algorithm to use; default=none. Allowable values are
  • none - no compression
  • gzip - Gzip compression
  • bzip2 - Bzip2 compression

method - compression method


protected void expandFile(FileUtils fileUtils,
expandFile in class Expand

Copyright 2000-2002 Apache Software Foundation. All Rights Reserved.