org.apache.commons.compress.archivers.zip
Class ZipArchive

java.lang.Object
  extended by org.apache.commons.compress.PackableObject
      extended by org.apache.commons.compress.AbstractArchive
          extended by org.apache.commons.compress.archivers.zip.ZipArchive
All Implemented Interfaces:
Archive

public class ZipArchive
extends AbstractArchive

Archive-Implementation for Zip.


Field Summary
 
Fields inherited from class org.apache.commons.compress.PackableObject
CHOOSE_EXTENSION, CHOOSE_NAME
 
Constructor Summary
ZipArchive()
          This Archive should be instantiated in the Archive-Interface.
 
Method Summary
protected  void doSave(OutputStream output)
          Specific implementation of the save opteration.
protected  void doUnpack(File unpackDir)
          Specific implementation of the unpack opteration.
 String getDefaultFileExtension()
          Returns the default FileExtension for this archive, for example "zip", "tar"...
 byte[] getHeader()
          Header byte array for this archive.
 String getName()
          Returns the ArchiveName for this archive.
 
Methods inherited from class org.apache.commons.compress.AbstractArchive
add, add, close, getArchive, getEntryIterator, save, save, setArchive, unpack
 
Methods inherited from class org.apache.commons.compress.PackableObject
identifyByHeader, isPackableWith
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipArchive

public ZipArchive()
This Archive should be instantiated in the Archive-Interface.

Method Detail

doUnpack

protected void doUnpack(File unpackDir)
                 throws UnpackException
Description copied from class: AbstractArchive
Specific implementation of the unpack opteration.

Specified by:
doUnpack in class AbstractArchive
Parameters:
unpackDir - dir, to unpack to
Throws:
UnpackException

doSave

protected void doSave(OutputStream output)
               throws ArchiveException
Description copied from class: AbstractArchive
Specific implementation of the save opteration.

Specified by:
doSave in class AbstractArchive
Parameters:
output - - stream to archive to
Throws:
ArchiveException

getName

public String getName()
Description copied from class: PackableObject
Returns the ArchiveName for this archive.

Specified by:
getName in class PackableObject

getDefaultFileExtension

public String getDefaultFileExtension()
Description copied from class: PackableObject
Returns the default FileExtension for this archive, for example "zip", "tar"...

Specified by:
getDefaultFileExtension in class PackableObject

getHeader

public byte[] getHeader()
Description copied from class: PackableObject
Header byte array for this archive.

Specified by:
getHeader in class PackableObject


Copyright © 2011 Apache Software Foundation. All Rights Reserved.