| Modifier and Type | Class and Description |
|---|---|
| public static class | Tar.TarCompressionMethod
Valid Modes for Compression attribute to Tar Task |
| public static class | Tar.TarFileSet
This is a FileSet with the option to specify permissions and other attributes. |
| public static class | Tar.TarLongFileMode
Set of options for long file handling in the task. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv File | |
| private static final int | |
| private Tar. | |
| private String | encoding
Encoding to use for filenames, defaults to the platform's default encoding. |
| public static final String | FAIL
Deprecated
since 1.5.x.
Tar.FAIL is deprecated and is replaced with
Tar.TarLongFileMode.FAIL
|
| pack-priv Vector | |
| public static final String | GNU
Deprecated
since 1.5.x.
Tar.GNU is deprecated and is replaced with
Tar.TarLongFileMode.GNU
|
| private Tar. | |
| private boolean | longWarningGiven
Indicates whether the user has been warned about long files already. |
| public static final String | OMIT
Deprecated
since 1.5.x.
Tar.OMIT is deprecated and is replaced with
Tar.TarLongFileMode.OMIT
|
| private final List | |
| pack-priv File | |
| public static final String | TRUNCATE
Deprecated
since 1.5.x.
Tar.TRUNCATE is deprecated and is replaced with
Tar.TarLongFileMode.TRUNCATE
|
| public static final String | WARN
Deprecated
since 1.5.x.
Tar.WARN is deprecated and is replaced with
Tar.TarLongFileMode.WARN
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(final ResourceCollection
a resource collection to archive. res)Add a collection of resources to archive. |
| protected boolean | Returns: true if the archive is up to date.the files to check files)
Deprecated
since 1.5.x.
use the two-arg version instead.
Is the archive up to date in relationship to a list of files.
|
| protected boolean | Returns: true if the archive is up to date.the files to check files, final File the base directory for the files. dir)Is the archive up to date in relationship to a list of files. |
| protected boolean | Returns: true if the archive is up to date.the files to check r)Is the archive up to date in relationship to a list of files. |
| protected Tar. | Returns: a new TarFileSet.fileset to copy attributes from, may be null archiveFileSet)Copies fullpath, prefix and permission attributes from the ArchiveFileSet to a new TarFileSet (or returns it unchanged if it already is a TarFileSet). |
| protected boolean | Returns: whether the archive is up-to-datethe resource collection to check rc)Checks whether the archive is out-of-date with respect to the resources of the given collection. |
| protected boolean | |
| protected boolean | Returns: whether the archive is up-to-datebase directory for file names basedir, final Collection<String> array of relative file names files)Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself. |
| public Tar. | Returns: the tar fileset to be used as the nested element.Add a new fileset with the option to specify permissions |
| public void | |
| private static String | |
| protected static String[] | Returns: a list of the filenames.the fileset to operate on. fs)Grabs all included files and directors from the FileSet and returns them as an array of (relative) file names. |
| protected static boolean | Returns: true if the collection is a fileset.the resource collection to check. rc)whether the given resource collection is a (subclass of) FileSet that only contains file system resources. |
| public void | setBasedir(final File
the base directory. baseDir)This is the base directory to look in for things to tar. |
| public void | |
| public void | setDestFile(final File
The output of the tar destFile)Set is the name/location of where to create the tar file. |
| public void | setEncoding(final String
the encoding name encoding)Encoding to use for filenames, defaults to the platform's default encoding. |
| public void | setLongfile(final String
the mode string to handle long files. mode)
Deprecated
since 1.5.x.
Set how to handle long files, those with a path>100 chars.
|
| public void | setLongfile(final Tar.
the mode to handle long file names. modeSet how to handle long files, those with a path>100 chars. |
| public void | setTarfile(final File
the location of the tar file. tarFile)
Deprecated
since 1.5.x.
For consistency with other tasks, please use setDestFile().
Set is the name/location of where to create the tar file.
|
| protected boolean | Returns: true for this task.Whether this task can deal with non-file resources. |
| protected void | tar(final ResourceCollection
the collection containing resources to add rc, final TarOutputStream stream writing to the archive. tOut)Adds the resources contained in this collection to the archive. |
| protected void | tarFile(final File
the file to tar file, final TarOutputStream the output stream tOut, final String the path name of the file to tar vPath, final Tar.the fileset that the file came from. tarFileSettar a file |
| protected void | tarResource(final Resource
the resource to tar r, final TarOutputStream the output stream tOut, String the path name of the file to tar vPath, final Tar.the fileset that the file came from, may be null. tarFileSettar a resource |
| baseDir | back to summary |
|---|---|
| pack-priv File baseDir | |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| compression | back to summary |
|---|---|
| private Tar. | |
| encoding | back to summary |
|---|---|
| private String encoding Encoding to use for filenames, defaults to the platform's default encoding. | |
| FAIL | back to summary |
|---|---|
| public static final String FAIL
Deprecated since 1.5.x. Tar.FAIL is deprecated and is replaced with Tar.TarLongFileMode.FAIL | |
| filesets | back to summary |
|---|---|
| pack-priv Vector<Tar. | |
| GNU | back to summary |
|---|---|
| public static final String GNU
Deprecated since 1.5.x. Tar.GNU is deprecated and is replaced with Tar.TarLongFileMode.GNU | |
| longFileMode | back to summary |
|---|---|
| private Tar. | |
| longWarningGiven | back to summary |
|---|---|
| private boolean longWarningGiven Indicates whether the user has been warned about long files already. | |
| OMIT | back to summary |
|---|---|
| public static final String OMIT
Deprecated since 1.5.x. Tar.OMIT is deprecated and is replaced with Tar.TarLongFileMode.OMIT | |
| resourceCollections | back to summary |
|---|---|
| private final List<ResourceCollection> resourceCollections | |
| tarFile | back to summary |
|---|---|
| pack-priv File tarFile | |
| TRUNCATE | back to summary |
|---|---|
| public static final String TRUNCATE
Deprecated since 1.5.x. Tar.TRUNCATE is deprecated and is replaced with Tar.TarLongFileMode.TRUNCATE | |
| WARN | back to summary |
|---|---|
| public static final String WARN
Deprecated since 1.5.x. Tar.WARN is deprecated and is replaced with Tar.TarLongFileMode.WARN | |
| Tar | back to summary |
|---|---|
| public Tar() | |
| add | back to summary |
|---|---|
| public void add(final ResourceCollection res) Add a collection of resources to archive.
| |
| archiveIsUpToDate | back to summary |
|---|---|
| protected boolean archiveIsUpToDate(final String[] files)
Deprecated since 1.5.x. use the two-arg version instead. Is the archive up to date in relationship to a list of files.
| |
| archiveIsUpToDate | back to summary |
|---|---|
| protected boolean archiveIsUpToDate(final String[] files, final File dir) Is the archive up to date in relationship to a list of files. | |
| archiveIsUpToDate | back to summary |
|---|---|
| protected boolean archiveIsUpToDate(final Resource r) Is the archive up to date in relationship to a list of files.
| |
| asTarFileSet | back to summary |
|---|---|
| protected Tar. Copies fullpath, prefix and permission attributes from the ArchiveFileSet to a new TarFileSet (or returns it unchanged if it already is a TarFileSet).
| |
| check | back to summary |
|---|---|
| protected boolean check(final ResourceCollection rc) Checks whether the archive is out-of-date with respect to the resources of the given collection. Also checks that either all collections only contain file resources or this class supports non-file collections. And - in case of file-collections - ensures that the archive won't contain itself.
| |
| check | back to summary |
|---|---|
| protected boolean check(final File basedir, final String[] files) Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself. | |
| check | back to summary |
|---|---|
| protected boolean check(final File basedir, final Collection<String> files) Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself.
| |
| createTarFileSet | back to summary |
|---|---|
| public Tar. Add a new fileset with the option to specify permissions
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. do the business
| |
| getCanonicalPrefix | back to summary |
|---|---|
| private static String getCanonicalPrefix(Tar. | |
| getFileNames | back to summary |
|---|---|
| protected static String[] getFileNames(final FileSet fs) Grabs all included files and directors from the FileSet and returns them as an array of (relative) file names. | |
| isFileFileSet | back to summary |
|---|---|
| protected static boolean isFileFileSet(final ResourceCollection rc) whether the given resource collection is a (subclass of) FileSet that only contains file system resources.
| |
| setBasedir | back to summary |
|---|---|
| public void setBasedir(final File baseDir) This is the base directory to look in for things to tar.
| |
| setCompression | back to summary |
|---|---|
| public void setCompression(final Tar. Set compression method. Allowable values are
| |
| setDestFile | back to summary |
|---|---|
| public void setDestFile(final File destFile) Set is the name/location of where to create the tar file.
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(final String encoding) Encoding to use for filenames, defaults to the platform's default encoding. For a list of possible values see https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html.
| |
| setLongfile | back to summary |
|---|---|
| public void setLongfile(final String mode)
Deprecated since 1.5.x. setLongFile(String) is deprecated and is replaced with setLongFile(Tar.TarLongFileMode) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the mode in its own class. Set how to handle long files, those with a path>100 chars. Optional, default=warn. Allowable values are
| |
| setLongfile | back to summary |
|---|---|
| public void setLongfile(final Tar. Set how to handle long files, those with a path>100 chars. Optional, default=warn. Allowable values are
| |
| setTarfile | back to summary |
|---|---|
| public void setTarfile(final File tarFile)
Deprecated since 1.5.x. For consistency with other tasks, please use setDestFile(). Set is the name/location of where to create the tar file.
| |
| supportsNonFileResources | back to summary |
|---|---|
| protected boolean supportsNonFileResources() Whether this task can deal with non-file resources. This implementation returns true only if this task is <tar>. Any subclass of this class that also wants to support non-file resources needs to override this method. We need to do so for backwards compatibility reasons since we can't expect subclasses to support resources.
| |
| tar | back to summary |
|---|---|
| protected void tar(final ResourceCollection rc, final TarOutputStream tOut) throws IOException Adds the resources contained in this collection to the archive. Uses the file based methods for file resources for backwards compatibility.
| |
| tarFile | back to summary |
|---|---|
| protected void tarFile(final File file, final TarOutputStream tOut, final String vPath, final Tar. tar a file
| |
| tarResource | back to summary |
|---|---|
| protected void tarResource(final Resource r, final TarOutputStream tOut, String vPath, final Tar. tar a resource
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | BZIP2
BZIP2 compression |
| private static final String | GZIP
GZIP compression |
| private static final String | NONE
No compression |
| private static final String | XZ
XZ compression |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private OutputStream | Returns: output stream with on-the-fly compressionoutput stream ostream)This method wraps the output stream with the corresponding compression method |
| public String[] | Returns: valid enumeration valuesImplements abstract org. |
| private static OutputStream |
| BZIP2 | back to summary |
|---|---|
| private static final String BZIP2 BZIP2 compression | |
| GZIP | back to summary |
|---|---|
| private static final String GZIP GZIP compression | |
| NONE | back to summary |
|---|---|
| private static final String NONE No compression | |
| XZ | back to summary |
|---|---|
| private static final String XZ XZ compression
| |
| TarCompressionMethod | back to summary |
|---|---|
| public TarCompressionMethod() Default constructor | |
| compress | back to summary |
|---|---|
| private OutputStream compress(final OutputStream ostream) throws IOException This method wraps the output stream with the corresponding compression method
| |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. Get valid enumeration values. | |
| newXZOutputStream | back to summary |
|---|---|
| private static OutputStream newXZOutputStream(OutputStream ostream) throws BuildException | |
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | |
| public int | |
| public boolean | |
| public void | |
| public void | setPreserveLeadingSlashes(final boolean
the leading slashes flag. b)Flag to indicates whether leading `/'s should be preserved in the file names. |
| files | back to summary |
|---|---|
| private String[] files | |
| preserveLeadingSlashes | back to summary |
|---|---|
| private boolean preserveLeadingSlashes | |
| TarFileSet | back to summary |
|---|---|
| public TarFileSet(final FileSet fileset) Creates a new
| |
| TarFileSet | back to summary |
|---|---|
| public TarFileSet() Creates a new | |
| getFiles | back to summary |
|---|---|
| public String[] getFiles(final Project p) Get a list of files and directories specified in the fileset. | |
| getMode | back to summary |
|---|---|
public int getMode()
| |
| getPreserveLeadingSlashes | back to summary |
|---|---|
public boolean getPreserveLeadingSlashes()
| |
| setMode | back to summary |
|---|---|
| public void setMode(final String octalString) A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
| |
| setPreserveLeadingSlashes | back to summary |
|---|---|
| public void setPreserveLeadingSlashes(final boolean b) Flag to indicates whether leading `/'s should
be preserved in the file names.
Optional, default is
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | FAIL
permissible values for longfile attribute |
| public static final String | GNU
permissible values for longfile attribute |
| public static final String | OMIT
permissible values for longfile attribute |
| public static final String | POSIX
permissible values for longfile attribute |
| public static final String | TRUNCATE
permissible values for longfile attribute |
| private static final String[] | |
| public static final String | WARN
permissible values for longfile attribute |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: the possible values for this enumerated type.Implements abstract org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean |
| FAIL | back to summary |
|---|---|
| public static final String FAIL permissible values for longfile attribute | |
| GNU | back to summary |
|---|---|
| public static final String GNU permissible values for longfile attribute | |
| OMIT | back to summary |
|---|---|
| public static final String OMIT permissible values for longfile attribute | |
| POSIX | back to summary |
|---|---|
| public static final String POSIX permissible values for longfile attribute | |
| TRUNCATE | back to summary |
|---|---|
| public static final String TRUNCATE permissible values for longfile attribute | |
| VALID_MODES | back to summary |
|---|---|
| private static final String[] VALID_MODES | |
| WARN | back to summary |
|---|---|
| public static final String WARN permissible values for longfile attribute | |
| TarLongFileMode | back to summary |
|---|---|
| public TarLongFileMode() Constructor, defaults to "warn" | |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. Doc from org. This is the only method a subclass needs to implement. | |
| isFailMode | back to summary |
|---|---|
public boolean isFailMode()
| |
| isGnuMode | back to summary |
|---|---|
public boolean isGnuMode()
| |
| isOmitMode | back to summary |
|---|---|
public boolean isOmitMode()
| |
| isPosixMode | back to summary |
|---|---|
public boolean isPosixMode()
| |
| isTruncateMode | back to summary |
|---|---|
public boolean isTruncateMode()
| |
| isWarnMode | back to summary |
|---|---|
public boolean isWarnMode()
| |