public abstract class AbstractUnArchiver extends org.codehaus.plexus.logging.AbstractLogEnabled implements UnArchiver, FinalizerEnabled
ROLE| Constructor and Description |
|---|
AbstractUnArchiver() |
AbstractUnArchiver(File sourceFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArchiveFinalizer(ArchiveFinalizer finalizer) |
protected abstract void |
execute() |
protected abstract void |
execute(String path,
File outputDirectory) |
void |
extract()
Extract the archive.
|
void |
extract(String path,
File outputDirectory)
Take a patch into the archive and extract it to the specified directory.
|
protected void |
extractFile(File srcF,
File dir,
InputStream compressedInputStream,
String entryName,
Date entryDate,
boolean isDirectory,
Integer mode,
String symlinkDestination) |
File |
getDestDirectory() |
File |
getDestFile() |
org.codehaus.plexus.components.io.fileselectors.FileSelector[] |
getFileSelectors()
Returns a set of
FileSelector instances, which may be used to select the files to extract from the
archive. |
File |
getSourceFile() |
boolean |
isIgnorePermissions() |
boolean |
isOverwrite() |
protected boolean |
isSelected(String fileName,
org.codehaus.plexus.components.io.resources.PlexusIoResource fileInfo) |
boolean |
isUseJvmChmod() |
void |
setArchiveFinalizers(List archiveFinalizers) |
void |
setDestDirectory(File destDirectory) |
void |
setDestFile(File destFile) |
void |
setFileSelectors(org.codehaus.plexus.components.io.fileselectors.FileSelector[] fileSelectors)
Sets a set of
FileSelector instances, which may be used to select the files to extract from the archive. |
void |
setIgnorePermissions(boolean ignorePermissions) |
void |
setOverwrite(boolean b)
Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?
|
void |
setSourceFile(File sourceFile) |
void |
setUseJvmChmod(boolean useJvmChmod)
jvm chmod won't set group level permissions !
|
protected void |
validate() |
protected void |
validate(String path,
File outputDirectory) |
public AbstractUnArchiver()
public AbstractUnArchiver(File sourceFile)
public File getDestDirectory()
getDestDirectory in interface UnArchiverpublic void setDestDirectory(File destDirectory)
setDestDirectory in interface UnArchiverpublic File getDestFile()
getDestFile in interface UnArchiverpublic void setDestFile(File destFile)
setDestFile in interface UnArchiverpublic File getSourceFile()
getSourceFile in interface UnArchiverpublic void setSourceFile(File sourceFile)
setSourceFile in interface UnArchiverpublic boolean isOverwrite()
public void setOverwrite(boolean b)
UnArchiversetOverwrite in interface UnArchiverpublic final void extract()
throws ArchiverException
UnArchiverextract in interface UnArchiverArchiverExceptionpublic final void extract(String path, File outputDirectory) throws ArchiverException
UnArchiverextract in interface UnArchiverpath - Path inside the archive to be extracted.outputDirectory - Directory to extract to.ArchiverExceptionpublic void addArchiveFinalizer(ArchiveFinalizer finalizer)
addArchiveFinalizer in interface FinalizerEnabledpublic void setArchiveFinalizers(List archiveFinalizers)
setArchiveFinalizers in interface FinalizerEnabledprotected void validate()
throws ArchiverException
ArchiverExceptionpublic void setFileSelectors(org.codehaus.plexus.components.io.fileselectors.FileSelector[] fileSelectors)
UnArchiverFileSelector instances, which may be used to select the files to extract from the archive.
If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors.setFileSelectors in interface UnArchiverpublic org.codehaus.plexus.components.io.fileselectors.FileSelector[] getFileSelectors()
UnArchiverFileSelector instances, which may be used to select the files to extract from the
archive. If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors.getFileSelectors in interface UnArchiverprotected boolean isSelected(String fileName, org.codehaus.plexus.components.io.resources.PlexusIoResource fileInfo) throws ArchiverException
ArchiverExceptionprotected abstract void execute()
throws ArchiverException
ArchiverExceptionprotected abstract void execute(String path, File outputDirectory) throws ArchiverException
ArchiverExceptionpublic boolean isUseJvmChmod()
isUseJvmChmod in interface UnArchiverpublic void setUseJvmChmod(boolean useJvmChmod)
setUseJvmChmod in interface UnArchiverpublic boolean isIgnorePermissions()
isIgnorePermissions in interface UnArchiverpublic void setIgnorePermissions(boolean ignorePermissions)
setIgnorePermissions in interface UnArchiverprotected void extractFile(File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory, Integer mode, String symlinkDestination) throws IOException, ArchiverException
IOExceptionArchiverExceptionCopyright © 2001-2016 Codehaus. All Rights Reserved.