Class ZipArchive
- java.lang.Object
-
- org.apache.commons.compress.PackableObject
-
- org.apache.commons.compress.AbstractArchive
-
- org.apache.commons.compress.archivers.zip.ZipArchive
-
- All Implemented Interfaces:
org.apache.commons.compress.Archive
public class ZipArchive extends org.apache.commons.compress.AbstractArchiveArchive-Implementation for Zip.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringARCHIVER_NAMEARCHIVER_NAME Field for this archiver.private static intBUFFERprivate static java.lang.StringDEFAULT_FILE_EXTENSIONDEFAULT_FILE_EXTENSION Field for this archiver.private static byte[]HEADERHEADER Field for this archiver.
-
Constructor Summary
Constructors Constructor Description ZipArchive()This Archive should be instantiated in the Archive-Interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoSave(java.io.OutputStream output)Specific implementation of the save opteration.protected voiddoUnpack(java.io.File unpackDir)Specific implementation of the unpack opteration.java.lang.StringgetDefaultFileExtension()Returns the default FileExtension for this archive, for example "zip", "tar"...byte[]getHeader()Header byte array for this archive.java.lang.StringgetName()Returns the ArchiveName for this archive.-
Methods inherited from class org.apache.commons.compress.AbstractArchive
add, add, close, getArchive, getEntryIterator, save, save, setArchive, unpack
-
-
-
-
Field Detail
-
BUFFER
private static final int BUFFER
- See Also:
- Constant Field Values
-
HEADER
private static final byte[] HEADER
HEADER Field for this archiver.
-
DEFAULT_FILE_EXTENSION
private static java.lang.String DEFAULT_FILE_EXTENSION
DEFAULT_FILE_EXTENSION Field for this archiver.
-
ARCHIVER_NAME
private static final java.lang.String ARCHIVER_NAME
ARCHIVER_NAME Field for this archiver.- See Also:
- Constant Field Values
-
-
Method Detail
-
doUnpack
protected void doUnpack(java.io.File unpackDir) throws org.apache.commons.compress.UnpackExceptionDescription copied from class:org.apache.commons.compress.AbstractArchiveSpecific implementation of the unpack opteration.- Specified by:
doUnpackin classorg.apache.commons.compress.AbstractArchive- Parameters:
unpackDir- dir, to unpack to- Throws:
org.apache.commons.compress.UnpackException
-
doSave
protected void doSave(java.io.OutputStream output) throws org.apache.commons.compress.ArchiveExceptionDescription copied from class:org.apache.commons.compress.AbstractArchiveSpecific implementation of the save opteration.- Specified by:
doSavein classorg.apache.commons.compress.AbstractArchive- Parameters:
output- - stream to archive to- Throws:
org.apache.commons.compress.ArchiveException
-
getName
public java.lang.String getName()
Description copied from class:org.apache.commons.compress.PackableObjectReturns the ArchiveName for this archive.- Specified by:
getNamein classorg.apache.commons.compress.PackableObject
-
getDefaultFileExtension
public java.lang.String getDefaultFileExtension()
Description copied from class:org.apache.commons.compress.PackableObjectReturns the default FileExtension for this archive, for example "zip", "tar"...- Specified by:
getDefaultFileExtensionin classorg.apache.commons.compress.PackableObject
-
getHeader
public byte[] getHeader()
Description copied from class:org.apache.commons.compress.PackableObjectHeader byte array for this archive.- Specified by:
getHeaderin classorg.apache.commons.compress.PackableObject
-
-