Package net.lingala.zip4j.progress
Class ProgressMonitor
- java.lang.Object
-
- net.lingala.zip4j.progress.ProgressMonitor
-
public class ProgressMonitor extends java.lang.Object
If 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 class
ProgressMonitor.Result
static class
ProgressMonitor.State
static class
ProgressMonitor.Task
-
Field Summary
Fields Modifier and Type Field Description private boolean
cancelAllTasks
private ProgressMonitor.Task
currentTask
private java.lang.Exception
exception
private java.lang.String
fileName
private boolean
pause
private int
percentDone
private ProgressMonitor.Result
result
private ProgressMonitor.State
state
private long
totalWork
private long
workCompleted
-
Constructor Summary
Constructors Constructor Description ProgressMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endProgressMonitor()
void
endProgressMonitor(java.lang.Exception e)
void
fullReset()
ProgressMonitor.Task
getCurrentTask()
java.lang.Exception
getException()
java.lang.String
getFileName()
int
getPercentDone()
ProgressMonitor.Result
getResult()
ProgressMonitor.State
getState()
long
getTotalWork()
long
getWorkCompleted()
boolean
isCancelAllTasks()
boolean
isPause()
private void
reset()
void
setCancelAllTasks(boolean cancelAllTasks)
void
setCurrentTask(ProgressMonitor.Task currentTask)
void
setException(java.lang.Exception exception)
void
setFileName(java.lang.String fileName)
void
setPause(boolean pause)
void
setPercentDone(int percentDone)
void
setResult(ProgressMonitor.Result result)
void
setState(ProgressMonitor.State state)
void
setTotalWork(long totalWork)
void
updateWorkCompleted(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)
-
-