Package net.lingala.zip4j.progress
Class ProgressMonitor
- java.lang.Object
-
- net.lingala.zip4j.progress.ProgressMonitor
-
public class ProgressMonitor extends java.lang.ObjectIf Zip4j is set to run in thread mode, this class helps retrieve current progress
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProgressMonitor.Resultstatic classProgressMonitor.Statestatic classProgressMonitor.Task
-
Field Summary
Fields Modifier and Type Field Description private booleancancelAllTasksprivate ProgressMonitor.TaskcurrentTaskprivate java.lang.Exceptionexceptionprivate java.lang.StringfileNameprivate booleanpauseprivate intpercentDoneprivate ProgressMonitor.Resultresultprivate ProgressMonitor.Statestateprivate longtotalWorkprivate longworkCompleted
-
Constructor Summary
Constructors Constructor Description ProgressMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendProgressMonitor()voidendProgressMonitor(java.lang.Exception e)voidfullReset()ProgressMonitor.TaskgetCurrentTask()java.lang.ExceptiongetException()java.lang.StringgetFileName()intgetPercentDone()ProgressMonitor.ResultgetResult()ProgressMonitor.StategetState()longgetTotalWork()longgetWorkCompleted()booleanisCancelAllTasks()booleanisPause()private voidreset()voidsetCancelAllTasks(boolean cancelAllTasks)voidsetCurrentTask(ProgressMonitor.Task currentTask)voidsetException(java.lang.Exception exception)voidsetFileName(java.lang.String fileName)voidsetPause(boolean pause)voidsetPercentDone(int percentDone)voidsetResult(ProgressMonitor.Result result)voidsetState(ProgressMonitor.State state)voidsetTotalWork(long totalWork)voidupdateWorkCompleted(long workCompleted)
-
-
-
Field Detail
-
state
private ProgressMonitor.State state
-
totalWork
private long totalWork
-
workCompleted
private long workCompleted
-
percentDone
private int percentDone
-
currentTask
private ProgressMonitor.Task currentTask
-
fileName
private java.lang.String fileName
-
result
private ProgressMonitor.Result result
-
exception
private java.lang.Exception exception
-
cancelAllTasks
private boolean cancelAllTasks
-
pause
private boolean pause
-
-
Method Detail
-
updateWorkCompleted
public void updateWorkCompleted(long workCompleted)
-
endProgressMonitor
public void endProgressMonitor()
-
endProgressMonitor
public void endProgressMonitor(java.lang.Exception e)
-
fullReset
public void fullReset()
-
reset
private void reset()
-
getState
public ProgressMonitor.State getState()
-
setState
public void setState(ProgressMonitor.State state)
-
getTotalWork
public long getTotalWork()
-
setTotalWork
public void setTotalWork(long totalWork)
-
getWorkCompleted
public long getWorkCompleted()
-
getPercentDone
public int getPercentDone()
-
setPercentDone
public void setPercentDone(int percentDone)
-
getCurrentTask
public ProgressMonitor.Task getCurrentTask()
-
setCurrentTask
public void setCurrentTask(ProgressMonitor.Task currentTask)
-
getFileName
public java.lang.String getFileName()
-
setFileName
public void setFileName(java.lang.String fileName)
-
getResult
public ProgressMonitor.Result getResult()
-
setResult
public void setResult(ProgressMonitor.Result result)
-
getException
public java.lang.Exception getException()
-
setException
public void setException(java.lang.Exception exception)
-
isCancelAllTasks
public boolean isCancelAllTasks()
-
setCancelAllTasks
public void setCancelAllTasks(boolean cancelAllTasks)
-
isPause
public boolean isPause()
-
setPause
public void setPause(boolean pause)
-
-