Package org.codehaus.plexus.archiver.zip
Class AbstractZipUnArchiver
- java.lang.Object
-
- org.codehaus.plexus.archiver.AbstractUnArchiver
-
- org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver
-
- All Implemented Interfaces:
FinalizerEnabled
,UnArchiver
- Direct Known Subclasses:
ZipUnArchiver
public abstract class AbstractZipUnArchiver extends AbstractUnArchiver
- Author:
- Emmanuel Venisse
-
-
Constructor Summary
Constructors Constructor Description AbstractZipUnArchiver()
AbstractZipUnArchiver(File sourceFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
execute()
protected void
execute(String path, File outputDirectory)
void
setEncoding(String encoding)
Sets the encoding to assume for file names and comments.void
setMaxOutputSize(long maxOutputSize)
Set maximum allowed size of the produced output.-
Methods inherited from class org.codehaus.plexus.archiver.AbstractUnArchiver
addArchiveFinalizer, extract, extract, extractFile, getDestDirectory, getDestFile, getFileMappers, getFileSelectors, getLogger, getSourceFile, isIgnorePermissions, isOverwrite, isSelected, isUseJvmChmod, setArchiveFinalizers, setDestDirectory, setDestFile, setFileMappers, setFileSelectors, setIgnorePermissions, setOverwrite, setSourceFile, setUseJvmChmod, shouldExtractEntry, validate, validate
-
-
-
-
Constructor Detail
-
AbstractZipUnArchiver
public AbstractZipUnArchiver()
-
AbstractZipUnArchiver
public AbstractZipUnArchiver(File sourceFile)
-
-
Method Detail
-
setEncoding
public void setEncoding(String encoding)
Sets the encoding to assume for file names and comments.Set to
native-encoding
if you want your platform's native encoding, defaults to UTF8.
-
setMaxOutputSize
public void setMaxOutputSize(long maxOutputSize)
Set maximum allowed size of the produced output. It may be used as a protection against zip bombs.- Parameters:
maxOutputSize
- max size of the produced output, in bytes. Must be greater than 0- Throws:
IllegalArgumentException
- if specified output size is less or equal to 0
-
execute
protected void execute() throws ArchiverException
- Specified by:
execute
in classAbstractUnArchiver
- Throws:
ArchiverException
-
execute
protected void execute(String path, File outputDirectory) throws ArchiverException
- Specified by:
execute
in classAbstractUnArchiver
- Throws:
ArchiverException
-
-