Package org.codehaus.plexus.archiver.zip
Class AbstractZipUnArchiver
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.plexus.archiver.AbstractUnArchiver
org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver
- All Implemented Interfaces:
FinalizerEnabled,UnArchiver,org.codehaus.plexus.logging.LogEnabled
- Direct Known Subclasses:
ZipUnArchiver
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.codehaus.plexus.archiver.UnArchiver
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute()protected voidprivate StringresolveSymlink(org.apache.commons.compress.archivers.zip.ZipFile zf, org.apache.commons.compress.archivers.zip.ZipArchiveEntry ze) voidsetEncoding(String encoding) Sets the encoding to assume for file names and comments.voidsetMaxOutputSize(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, getSourceFile, isIgnorePermissions, isOverwrite, isSelected, isUseJvmChmod, setArchiveFinalizers, setDestDirectory, setDestFile, setFileMappers, setFileSelectors, setIgnorePermissions, setOverwrite, setSourceFile, setUseJvmChmod, shouldExtractEntry, validate, validateMethods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
NATIVE_ENCODING
- See Also:
-
encoding
-
maxOutputSize
private long maxOutputSize
-
-
Constructor Details
-
AbstractZipUnArchiver
public AbstractZipUnArchiver() -
AbstractZipUnArchiver
-
-
Method Details
-
setEncoding
Sets the encoding to assume for file names and comments.Set to
native-encodingif 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
- Specified by:
executein classAbstractUnArchiver- Throws:
ArchiverException
-
resolveSymlink
private String resolveSymlink(org.apache.commons.compress.archivers.zip.ZipFile zf, org.apache.commons.compress.archivers.zip.ZipArchiveEntry ze) throws IOException - Throws:
IOException
-
execute
- Specified by:
executein classAbstractUnArchiver- Throws:
ArchiverException
-