net.sf.sevenzipjbinding
Interface IArchiveExtractCallback

All Superinterfaces:
IProgress

public interface IArchiveExtractCallback
extends IProgress

If you want to provide a password to extract files, you should also implement ICryptoGetTextPassword within your IArchiveExtractCallback-implementation.

Version:
4.65-1
Author:
Boris Brodski

Method Summary
 ISequentialOutStream getStream(int index, ExtractAskMode extractAskMode)
          Return sequential output stream for the file with index index.
 void prepareOperation(ExtractAskMode extractAskMode)
          Prepare operation.
 void setOperationResult(ExtractOperationResult extractOperationResult)
          Set result of extraction operation of the file with index index from last call of getStream(int, ExtractAskMode).
 
Methods inherited from interface net.sf.sevenzipjbinding.IProgress
setCompleted, setTotal
 

Method Detail

getStream

ISequentialOutStream getStream(int index,
                               ExtractAskMode extractAskMode)
                               throws SevenZipException
Return sequential output stream for the file with index index.

Parameters:
index - index of the item to extract
extractAskMode - extract ask mode
Returns:
an instance of ISequentialOutStream sequential out stream or null to skip the extraction of the current item (with index index) and proceed with the next one
Throws:
SevenZipException - in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There are no guarantee, that there are no further call back methods will be called. The first thrown exception will be saved and thrown late on from the first called 7-Zip-JBinding main method, such as ISevenZipInArchive.extract() or SevenZip.openInArchive().

prepareOperation

void prepareOperation(ExtractAskMode extractAskMode)
                      throws SevenZipException
Prepare operation. The index of the current archive item can be taken from the last call of getStream(int, ExtractAskMode).

Parameters:
extractAskMode - extract ask mode
Throws:
SevenZipException - in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There are no guarantee, that there are no further call back methods will be called. The first thrown exception will be saved and thrown late on from the first called 7-Zip-JBinding main method, such as ISevenZipInArchive.extract() or SevenZip.openInArchive().

setOperationResult

void setOperationResult(ExtractOperationResult extractOperationResult)
                        throws SevenZipException
Set result of extraction operation of the file with index index from last call of getStream(int, ExtractAskMode).

Parameters:
extractOperationResult - result of operation
Throws:
SevenZipException - in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There are no guarantee, that there are no further call back methods will be called. The first thrown exception will be saved and thrown late on from the first called 7-Zip-JBinding main method, such as ISevenZipInArchive.extract() or SevenZip.openInArchive().