Package net.sf.sevenzipjbinding.impl
Class OutArchive7zImpl
java.lang.Object
net.sf.sevenzipjbinding.impl.OutArchiveImpl<IOutItem7z>
net.sf.sevenzipjbinding.impl.OutArchive7zImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,IOutArchive<IOutItem7z>,IOutArchiveBase,IOutCreateArchive<IOutItem7z>,IOutCreateArchive7z,IOutFeatureSetEncryptHeader,IOutFeatureSetLevel,IOutFeatureSetMultithreading,IOutFeatureSetSolid,IOutUpdateArchive<IOutItem7z>,IOutUpdateArchive7z
public class OutArchive7zImpl
extends OutArchiveImpl<IOutItem7z>
implements IOutCreateArchive7z, IOutUpdateArchive7z
7z specific archive create and update class.
- Since:
- 9.20-2.00
- Author:
- Boris Brodski
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetHeaderEncryption(boolean enabled) Enable/disable header encryption for password protected archives.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.voidsetSolid(boolean solid) Set solid archive option.voidsetSolidExtension(boolean solidExtension) Put all files with the same extension following each other in the order of packing in a solid block.voidsetSolidFiles(int countOfFilesPerBlock) Put specified count of files in a single solid block.voidsetSolidSize(long countOfBytesPerBlock) Put specified count of bytes in a single solid block.voidsetThreadCount(int threadCount) Set number of threads to use.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
-
OutArchive7zImpl
public OutArchive7zImpl()
-
-
Method Details
-
setLevel
public void setLevel(int compressionLevel) Description copied from interface:IOutFeatureSetLevelSet 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
-
setHeaderEncryption
Description copied from interface:IOutFeatureSetEncryptHeaderEnable/disable header encryption for password protected archives. If enabled, the archive header containing file names and other metadata will be encrypted as well.
Note: ImplementICryptoGetTextPasswordin your callback class to turn on the encryption.- Specified by:
setHeaderEncryptionin interfaceIOutFeatureSetEncryptHeader- Parameters:
enabled-trueenable header encryption, otherwisefalse- Throws:
SevenZipException- in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There is no guarantee that no further callback methods will be called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such asIInArchive.extract()orSevenZip.openInArchive(). Up to four exceptions depending on the situation can be saved for further analysis. SeeSevenZipExceptionandSevenZipException.printStackTraceExtended()for details.
-
setSolid
public void setSolid(boolean solid) Set solid archive option. If deactivated, some other solid options like 'solid files' will take no effect.- Specified by:
setSolidin interfaceIOutFeatureSetSolid- Parameters:
solid-true- use default configuration,false- deactivate solid block mode
-
setSolidFiles
public void setSolidFiles(int countOfFilesPerBlock) Put specified count of files in a single solid block. SeeIOutFeatureSetSolid.setSolid(boolean).- Specified by:
setSolidFilesin interfaceIOutFeatureSetSolid- Parameters:
countOfFilesPerBlock- count of files per solid block.-1- use default configuration- See Also:
-
setSolidSize
public void setSolidSize(long countOfBytesPerBlock) Put specified count of bytes in a single solid block. SeeIOutFeatureSetSolid.setSolid(boolean).- Specified by:
setSolidSizein interfaceIOutFeatureSetSolid- Parameters:
countOfBytesPerBlock- count of bytes per solid block.-1- use default configuration.- See Also:
-
setSolidExtension
public void setSolidExtension(boolean solidExtension) Put all files with the same extension following each other in the order of packing in a solid block. SeeIOutFeatureSetSolid.setSolid(boolean).- Specified by:
setSolidExtensionin interfaceIOutFeatureSetSolid- Parameters:
solidExtension-true- activate this feature,false- use default configuration- See Also:
-
setThreadCount
public void setThreadCount(int threadCount) Set number of threads to use.- Specified by:
setThreadCountin interfaceIOutFeatureSetMultithreading- Parameters:
threadCount- number of threads to use,
0- match count of threads to the count of the available processors,
-1- use default value
-