Package net.sf.sevenzipjbinding.impl
Class OutArchiveZipImpl
java.lang.Object
net.sf.sevenzipjbinding.impl.OutArchiveImpl<IOutItemZip>
net.sf.sevenzipjbinding.impl.OutArchiveZipImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,IOutArchive<IOutItemZip>,IOutArchiveBase,IOutCreateArchive<IOutItemZip>,IOutCreateArchiveZip,IOutFeatureSetLevel,IOutUpdateArchive<IOutItemZip>,IOutUpdateArchiveZip
public class OutArchiveZipImpl
extends OutArchiveImpl<IOutItemZip>
implements IOutCreateArchiveZip, IOutUpdateArchiveZip
Zip specific archive create and update class.
- Since:
- 9.20-2.00
- Author:
- Boris Brodski
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateArchive(IOutStream outStream, int numberOfItems, IOutCreateCallback<? extends IOutItemZip> outCreateCallback) Create new archive.voidsetLevel(int compressionLevel) Set compression level: 0 - Copy mode (no compression) 1 - Fastest 3 - Fast 5 - Normal 7 - Maximum 9 - Ultra Note that the meaning of the compression level can differ across archive formats.Methods inherited from class net.sf.sevenzipjbinding.impl.OutArchiveImpl
close, createArchive, getArchiveFormat, getConnectedInArchive, getTracePrintStream, isTrace, setTrace, setTracePrintStream, updateItemsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.sevenzipjbinding.IOutArchiveBase
getTracePrintStream, isTrace, setTrace, setTracePrintStreamMethods inherited from interface net.sf.sevenzipjbinding.IOutCreateArchive
createArchive, getArchiveFormatMethods inherited from interface net.sf.sevenzipjbinding.IOutUpdateArchive
getArchiveFormat, getConnectedInArchive, updateItems
-
Constructor Details
-
OutArchiveZipImpl
public OutArchiveZipImpl()
-
-
Method Details
-
setLevel
public void setLevel(int compressionLevel) Set compression level:- 0 - Copy mode (no compression)
- 1 - Fastest
- 3 - Fast
- 5 - Normal
- 7 - Maximum
- 9 - Ultra
- Specified by:
setLevelin interfaceIOutFeatureSetLevel- Parameters:
compressionLevel- compression level to set.-1- use default
-
createArchive
public void createArchive(IOutStream outStream, int numberOfItems, IOutCreateCallback<? extends IOutItemZip> outCreateCallback) throws SevenZipException Description copied from interface:IOutCreateArchiveZipCreate new archive. To update an existing archive open it first and then useIInArchive.getConnectedOutArchive()to get an instance of theIOutUpdateArchiveinterface.
TheoutCreateCallbackis designed to get necessary information about archive items and provide information about progress of the operation.
- Specified by:
createArchivein interfaceIOutCreateArchiveZip- Parameters:
outStream- output stream to get the new archivenumberOfItems- number of items in the new archiveoutCreateCallback- callback object to exchange information about archive create operation.- Throws:
SevenZipException- 7-Zip or 7-Zip-JBinding error occurs. UseSevenZipException.printStackTraceExtended()to get stack traces of this SevenZipException and of all thrown 'caused by' exceptions.
-