net.sf.sevenzipjbinding
Interface IArchiveExtractCallback

All Superinterfaces:
IProgress

public interface IArchiveExtractCallback
extends IProgress

Main callback interface for extraction operations. If you want to provide a password to extract files, you should also implement ICryptoGetTextPassword within your IArchiveExtractCallback-implementation.

Since:
1.0
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 get called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such as ISevenZipInArchive.extract() or SevenZip.openInArchive(). Up to four exceptions depending on the situation can be saved for further analysis. See SevenZipException and SevenZipException.printStackTraceExtended() for details.

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 get called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such as ISevenZipInArchive.extract() or SevenZip.openInArchive(). Up to four exceptions depending on the situation can be saved for further analysis. See SevenZipException and SevenZipException.printStackTraceExtended() for details.

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 get called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such as ISevenZipInArchive.extract() or SevenZip.openInArchive(). Up to four exceptions depending on the situation can be saved for further analysis. See SevenZipException and SevenZipException.printStackTraceExtended() for details.