org.apache.ant.compress.taskdefs

## Class UnpackBase

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.tools.ant.taskdefs.Unpack
      - - org.apache.ant.compress.taskdefs.UnpackBase

- All Implemented Interfaces:
    java.lang.Cloneable
  Direct Known Subclasses:
    BUnzip2, GUnzip, UnBrotli, Undeflate, UnLZ4, UnLZMA, UnPack200, UnSnappy, UnXZ, UnZ

      public abstract class UnpackBase
      extends org.apache.tools.ant.taskdefs.Unpack

  Expands a resource that has been compressed.

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.taskdefs.Unpack

      `dest, source, srcResource`

    - ### Fields inherited from class org.apache.tools.ant.Task

      `target, taskName, taskType, wrapper`

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `UnpackBase(java.lang.String defaultExtension)`
    `protected` | `UnpackBase(java.lang.String defaultExtension, CompressorStreamFactory factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `extract()` Implement the uncompression.
    `protected java.lang.String` | `getDefaultExtension()` Get the default extension.
    `void` | `setDecompressConcatenated(boolean b)` Whether to extract the whole resource if it contains multiple concatenated streams.
    `protected void` | `setFactory(CompressorStreamFactory factory)`
    `protected boolean` | `supportsNonFileResources()` Yes, we can.

    - ### Methods inherited from class org.apache.tools.ant.taskdefs.Unpack

      `addConfigured, execute, setDest, setDest, setSrc, setSrc, setSrcResource`

    - ### Methods inherited from class org.apache.tools.ant.Task

      `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

    - ### Methods inherited from class org.apache.tools.ant.ProjectComponent

      `clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UnpackBase

          protected UnpackBase(java.lang.String defaultExtension,
                               CompressorStreamFactory factory)

    - #### UnpackBase

          protected UnpackBase(java.lang.String defaultExtension)

      Since:
        Apache Compress Antlib 1.1

  - ### Method Detail

    - #### setFactory

          protected final void setFactory(CompressorStreamFactory factory)

      Since:
        Apache Compress Antlib 1.1

    - #### getDefaultExtension

          protected final java.lang.String getDefaultExtension()

      Get the default extension.
      Specified by:
        `getDefaultExtension` in class `org.apache.tools.ant.taskdefs.Unpack`

    - #### setDecompressConcatenated

          public void setDecompressConcatenated(boolean b)

      Whether to extract the whole resource if it contains multiple concatenated streams.

      Defaults to false for backwards compatibility.

      Since:
        Apache Compress Antlib 1.2

    - #### extract

          protected void extract()

      Implement the uncompression.
      Specified by:
        `extract` in class `org.apache.tools.ant.taskdefs.Unpack`

    - #### supportsNonFileResources

          protected final boolean supportsNonFileResources()

      Yes, we can.
      Overrides:
        `supportsNonFileResources` in class `org.apache.tools.ant.taskdefs.Unpack`