org.apache.ant.compress.resources

## Class CommonsCompressFileSet

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.types.DataType
    - - org.apache.tools.ant.types.AbstractFileSet
      - - org.apache.tools.ant.types.FileSet
        - - org.apache.tools.ant.types.ArchiveFileSet
          - - org.apache.ant.compress.resources.CommonsCompressFileSet

- All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Iterable<org.apache.tools.ant.types.Resource>, org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.types.selectors.SelectorContainer
  Direct Known Subclasses:
    ArFileSet, ArjFileSet, CpioFileSet, DumpFileSet, SevenZFileSet, TarFileSet, ZipFileSet

      public abstract class CommonsCompressFileSet
      extends org.apache.tools.ant.types.ArchiveFileSet

  A fileset based on the contents of a commons compress archive. A CommonsCompressFileSet extends FileSets with the ability to extract a subset of the entries of an archive for inclusion in another archive. It also includes a prefix attribute which is prepended to each entry in the output archive.
  Since:
    Compress Antlib 1.3

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.types.ArchiveFileSet

      `DEFAULT_DIR_MODE, DEFAULT_FILE_MODE`

    - ### Fields inherited from class org.apache.tools.ant.types.DataType

      `checked, ref`

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

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `CommonsCompressFileSet()` Constructor for CommonsCompressFileSet
    `protected` | `CommonsCompressFileSet(CommonsCompressFileSet fileset)` Constructor using a CommonsCompressFileSet argument.
    `protected` | `CommonsCompressFileSet(org.apache.tools.ant.types.FileSet fileset)` Constructor using a fileset argument.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkCommonsCompressFileSetAttributesAllowed()` A check attributes for CommonsCompressFileSet.
    `CommonsCompressFileSet` | `clone()` Return a CommonsCompressFileSet that has the same properties as this one.
    `protected void` | `configureFileSet(org.apache.tools.ant.types.ArchiveFileSet zfs)` Configure a fileset based on this fileset.
    `java.lang.String` | `getEncoding()` Get the encoding used for this TarFileSet.
    `int` | `getGid()`
    `protected org.apache.tools.ant.types.AbstractFileSet` | `getRef(org.apache.tools.ant.Project p)` A CommonsCompressFileSet accepts another FileSet as reference
    `boolean` | `getSkipUnreadableEntries()` Whether to skip entries that Commons Compress signals it cannot read.
    `int` | `getUid()`
    `boolean` | `hasGroupIdBeenSet()`
    `boolean` | `hasUserIdBeenSet()`
    `protected abstract CommonsCompressFileSet` | `newFileSet(org.apache.tools.ant.types.FileSet fs)` Creates a new CommonsCompressFileSet based on the given fileset.
    `void` | `setEncoding(java.lang.String enc)` Set the encoding used for this CommonsCompressFileSet.
    `void` | `setGid(int gid)` The GID for the entry; optional, default="0" This is not the same as the group name.
    `void` | `setRefid(org.apache.tools.ant.types.Reference r)` Makes this instance in effect a reference to another instance.
    `void` | `setSkipUnreadableEntries(boolean b)` Whether to skip entries that Commons Compress signals it cannot read.
    `void` | `setUid(int uid)` The uid for the entry This is not the same as the User name.

    - ### Methods inherited from class org.apache.tools.ant.types.ArchiveFileSet

      `addConfigured, dieOnCircularReference, getCheckedRef, getDirectoryScanner, getDirMode, getDirMode, getFileMode, getFileMode, getFullpath, getFullpath, getPrefix, getPrefix, getSrc, getSrc, hasDirModeBeenSet, hasFileModeBeenSet, integerSetDirMode, integerSetFileMode, isFilesystemOnly, iterator, newArchiveScanner, setDir, setDirMode, setErrorOnMissingArchive, setFileMode, setFullpath, setPrefix, setSrc, setSrcResource, size, toString`

    - ### Methods inherited from class org.apache.tools.ant.types.AbstractFileSet

      `add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addExecutable, addFilename, addMajority, addModified, addNone, addNot, addOr, addOwnedBy, addPresent, addReadable, addSelector, addSize, addSymlink, addType, addWritable, appendExcludes, appendIncludes, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getErrorOnMissingDir, getMaxLevelsOfSymlinks, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setErrorOnMissingDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setMaxLevelsOfSymlinks, setupDirectoryScanner, setupDirectoryScanner`

    - ### Methods inherited from class org.apache.tools.ant.types.DataType

      `checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes`

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

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

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### CommonsCompressFileSet

          public CommonsCompressFileSet()

      Constructor for CommonsCompressFileSet

    - #### CommonsCompressFileSet

          protected CommonsCompressFileSet(org.apache.tools.ant.types.FileSet fileset)

      Constructor using a fileset argument.
      Parameters:
        `fileset` - the fileset to use

    - #### CommonsCompressFileSet

          protected CommonsCompressFileSet(CommonsCompressFileSet fileset)

      Constructor using a CommonsCompressFileSet argument.
      Parameters:
        `fileset` - the fileset to use

  - ### Method Detail

    - #### setEncoding

          public void setEncoding(java.lang.String enc)

      Set the encoding used for this CommonsCompressFileSet.
      Overrides:
        `setEncoding` in class `org.apache.tools.ant.types.ArchiveFileSet`
      Parameters:
        `enc` - encoding as String.

    - #### getEncoding

          public java.lang.String getEncoding()

      Get the encoding used for this TarFileSet.
      Overrides:
        `getEncoding` in class `org.apache.tools.ant.types.ArchiveFileSet`
      Returns:
        String encoding.

    - #### setUid

          public void setUid(int uid)

      The uid for the entry This is not the same as the User name.
      Parameters:
        `uid` - the id of the user for the entry.

    - #### getUid

          public int getUid()

      Returns:
        the uid for the entry

    - #### hasUserIdBeenSet

          public boolean hasUserIdBeenSet()

      Returns:
        whether the user id has been explicitly set.

    - #### setGid

          public void setGid(int gid)

      The GID for the entry; optional, default="0" This is not the same as the group name.
      Parameters:
        `gid` - the group id.

    - #### getGid

          public int getGid()

      Returns:
        the group identifier.

    - #### hasGroupIdBeenSet

          public boolean hasGroupIdBeenSet()

      Returns:
        whether the group id has been explicitly set.

    - #### setSkipUnreadableEntries

          public void setSkipUnreadableEntries(boolean b)

      Whether to skip entries that Commons Compress signals it cannot read.

    - #### getSkipUnreadableEntries

          public boolean getSkipUnreadableEntries()

      Whether to skip entries that Commons Compress signals it cannot read.

    - #### setRefid

          public void setRefid(org.apache.tools.ant.types.Reference r)
                        throws org.apache.tools.ant.BuildException

      Makes this instance in effect a reference to another instance.

      You must not set another attribute or nest elements inside this element if you make it a reference.

      Overrides:
        `setRefid` in class `org.apache.tools.ant.types.AbstractFileSet`
      Parameters:
        `r` - the `Reference` to use.
      Throws:
        `org.apache.tools.ant.BuildException` - on error

    - #### getRef

          protected org.apache.tools.ant.types.AbstractFileSet getRef(org.apache.tools.ant.Project p)

      A CommonsCompressFileSet accepts another FileSet as reference
      Overrides:
        `getRef` in class `org.apache.tools.ant.types.AbstractFileSet`
      Parameters:
        `p` - the project to use
      Returns:
        the abstract fileset instance

    - #### configureFileSet

          protected void configureFileSet(org.apache.tools.ant.types.ArchiveFileSet zfs)

      Configure a fileset based on this fileset. If the fileset is a CommonsCompressFileSet copy in the specific attributes.
      Overrides:
        `configureFileSet` in class `org.apache.tools.ant.types.ArchiveFileSet`
      Parameters:
        `zfs` - the archive fileset to configure.

    - #### clone

          public CommonsCompressFileSet clone()

      Return a CommonsCompressFileSet that has the same properties as this one.
      Overrides:
        `clone` in class `org.apache.tools.ant.types.ArchiveFileSet`
      Returns:
        the cloned tarFileSet

    - #### newFileSet

          protected abstract CommonsCompressFileSet newFileSet(org.apache.tools.ant.types.FileSet fs)

      Creates a new CommonsCompressFileSet based on the given fileset.

    - #### checkCommonsCompressFileSetAttributesAllowed

          protected final void checkCommonsCompressFileSetAttributesAllowed()

      A check attributes for CommonsCompressFileSet. If there is a reference, and it is a CommonsCompressFileSet, the specific attributes cannot be used.