public class TarArchiver extends AbstractArchiver
| Modifier and Type | Class and Description |
|---|---|
static class |
TarArchiver.TarCompressionMethod
Valid Modes for Compression attribute to Tar Task
|
class |
TarArchiver.TarOptions
Valid Modes for Compression attribute to Tar Task
|
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE, DUPLICATES_ADD, DUPLICATES_FAIL, DUPLICATES_PRESERVE, DUPLICATES_SKIP, DUPLICATES_VALID_BEHAVIORS, ROLE| Constructor and Description |
|---|
TarArchiver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanUp() |
protected void |
close() |
protected void |
execute() |
protected String |
getArchiveType() |
TarArchiver.TarOptions |
getOptions() |
boolean |
isSupportingForced()
Returns, whether the archive supports uptodate checks.
|
void |
setCompression(TarArchiver.TarCompressionMethod mode)
Set compression method.
|
void |
setLongfile(TarLongFileMode mode)
Set how to handle long files, those with a path>100 chars.
|
void |
setOptions(TarArchiver.TarOptions options)
Set all tar options
|
protected void |
tarFile(ArchiveEntry entry,
TarOutputStream tOut,
String vPath)
tar a file
|
addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchiveFinalizer, addDirectory, addDirectory, addDirectory, addDirectory, addFile, addFile, addFileSet, addResource, addResources, asArchiveEntry, asArchiveEntry, asResourceCollection, checkForced, contextualize, createArchive, getArchiveFinalizers, getDefaultDirectoryMode, getDefaultFileMode, getDestFile, getDirectoryMode, getDirs, getDuplicateBehavior, getFileMode, getFiles, getIncludeEmptyDirs, getLogger, getOverrideDirectoryMode, getOverrideFileMode, getRawDefaultDirectoryMode, getRawDefaultFileMode, getResources, hasVirtualFiles, isForced, isIgnorePermissions, isUptodate, isUseJvmChmod, revert, runArchiveFinalizers, setArchiveFilters, setArchiveFinalizers, setDefaultDirectoryMode, setDefaultFileMode, setDestFile, setDirectoryMode, setDotFileDirectory, setDuplicateBehavior, setFileMode, setForced, setIgnorePermissions, setIncludeEmptyDirs, setUseJvmChmod, validatepublic TarArchiver.TarOptions getOptions()
public void setOptions(TarArchiver.TarOptions options)
options - optionspublic void setLongfile(TarLongFileMode mode)
mode - the mode to handle long file names.public void setCompression(TarArchiver.TarCompressionMethod mode)
mode - the compression method.protected void execute()
throws ArchiverException,
IOException
execute in class AbstractArchiverArchiverExceptionIOExceptionprotected void tarFile(ArchiveEntry entry, TarOutputStream tOut, String vPath) throws ArchiverException, IOException
entry - the file to tartOut - the output streamvPath - the path name of the file to tarIOException - on errorArchiverExceptionpublic boolean isSupportingForced()
ArchiverArchiver.setForced(boolean) to true.isSupportingForced in interface ArchiverisSupportingForced in class AbstractArchiverArchiver.setForced(boolean),
Archiver.isForced()protected void cleanUp()
cleanUp in class AbstractArchiverprotected void close()
throws IOException
close in class AbstractArchiverIOExceptionprotected String getArchiveType()
getArchiveType in class AbstractArchiverCopyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.