org.codehaus.plexus.util

## Class Expand

- java.lang.Object
- - org.codehaus.plexus.util.Expand

-     public class Expand
      extends Object

  Unzip a file.
  Since:
    Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" name="unwar"
  Version:
    $Id$
  Author:
    costin@dnt.ro, Stefan Bodewig, Magesh Umasankar

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Expand()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute()` Do the work.
    `protected void` | `expandFile(File srcF, File dir)` Description of the Method
    `protected void` | `extractFile(File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory)` Description of the Method
    `void` | `setDest(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(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 Exception

      Do the work.
      Throws:
        `Exception` - Thrown in unrecoverable error.

    - #### expandFile

          protected void expandFile(File srcF,
                        File dir)
                             throws Exception

      Description of the Method
      Throws:
        `Exception`

    - #### extractFile

          protected void extractFile(File srcF,
                         File dir,
                         InputStream compressedInputStream,
                         String entryName,
                         Date entryDate,
                         boolean isDirectory)
                              throws Exception

      Description of the Method
      Throws:
        `Exception`

    - #### setDest

          public void setDest(File d)

      Set the destination directory. File will be unzipped into the destination directory.
      Parameters:
        `d` - Path to the directory.

    - #### setSrc

          public void setSrc(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?

Copyright © 2015. All rights reserved.