Package net.lingala.zip4j.progress
Class ProgressMonitor
- java.lang.Object
-
- net.lingala.zip4j.progress.ProgressMonitor
-
public class ProgressMonitor extends Object
If Zip4j is set to run in thread mode, this class helps retrieve current progress
-
-
Field Summary
Fields Modifier and Type Field Description static intOPERATION_ADDstatic intOPERATION_CALC_CRCstatic intOPERATION_EXTRACTstatic intOPERATION_MERGEstatic intOPERATION_NONEstatic intOPERATION_REMOVEstatic intRESULT_CANCELLEDstatic intRESULT_ERRORstatic intRESULT_SUCCESSstatic intRESULT_WORKINGstatic intSTATE_BUSYstatic intSTATE_READY
-
Constructor Summary
Constructors Constructor Description ProgressMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelAllTasks()voidendProgressMonitorError(Throwable e)voidendProgressMonitorSuccess()voidfullReset()intgetCurrentOperation()ThrowablegetException()StringgetFileName()intgetPercentDone()intgetResult()intgetState()longgetTotalWork()longgetWorkCompleted()booleanisCancelAllTasks()booleanisPause()voidreset()voidsetCurrentOperation(int currentOperation)voidsetException(Throwable exception)voidsetFileName(String fileName)voidsetPause(boolean pause)voidsetPercentDone(int percentDone)voidsetResult(int result)voidsetState(int state)voidsetTotalWork(long totalWork)voidupdateWorkCompleted(long workCompleted)
-
-
-
Field Detail
-
STATE_READY
public static final int STATE_READY
- See Also:
- Constant Field Values
-
STATE_BUSY
public static final int STATE_BUSY
- See Also:
- Constant Field Values
-
RESULT_SUCCESS
public static final int RESULT_SUCCESS
- See Also:
- Constant Field Values
-
RESULT_WORKING
public static final int RESULT_WORKING
- See Also:
- Constant Field Values
-
RESULT_ERROR
public static final int RESULT_ERROR
- See Also:
- Constant Field Values
-
RESULT_CANCELLED
public static final int RESULT_CANCELLED
- See Also:
- Constant Field Values
-
OPERATION_NONE
public static final int OPERATION_NONE
- See Also:
- Constant Field Values
-
OPERATION_ADD
public static final int OPERATION_ADD
- See Also:
- Constant Field Values
-
OPERATION_EXTRACT
public static final int OPERATION_EXTRACT
- See Also:
- Constant Field Values
-
OPERATION_REMOVE
public static final int OPERATION_REMOVE
- See Also:
- Constant Field Values
-
OPERATION_CALC_CRC
public static final int OPERATION_CALC_CRC
- See Also:
- Constant Field Values
-
OPERATION_MERGE
public static final int OPERATION_MERGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getState
public int getState()
-
setState
public void setState(int state)
-
getTotalWork
public long getTotalWork()
-
setTotalWork
public void setTotalWork(long totalWork)
-
getWorkCompleted
public long getWorkCompleted()
-
updateWorkCompleted
public void updateWorkCompleted(long workCompleted)
-
getPercentDone
public int getPercentDone()
-
setPercentDone
public void setPercentDone(int percentDone)
-
getResult
public int getResult()
-
setResult
public void setResult(int result)
-
getFileName
public String getFileName()
-
setFileName
public void setFileName(String fileName)
-
getCurrentOperation
public int getCurrentOperation()
-
setCurrentOperation
public void setCurrentOperation(int currentOperation)
-
getException
public Throwable getException()
-
setException
public void setException(Throwable exception)
-
endProgressMonitorSuccess
public void endProgressMonitorSuccess() throws ZipException- Throws:
ZipException
-
endProgressMonitorError
public void endProgressMonitorError(Throwable e) throws ZipException
- Throws:
ZipException
-
reset
public void reset()
-
fullReset
public void fullReset()
-
isCancelAllTasks
public boolean isCancelAllTasks()
-
cancelAllTasks
public void cancelAllTasks()
-
isPause
public boolean isPause()
-
setPause
public void setPause(boolean pause)
-
-