net.lingala.zip4j.progress
Class ProgressMonitor

java.lang.Object
  extended by 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
static int OPERATION_ADD
           
static int OPERATION_CALC_CRC
           
static int OPERATION_EXTRACT
           
static int OPERATION_MERGE
           
static int OPERATION_NONE
           
static int OPERATION_REMOVE
           
static int RESULT_CANCELLED
           
static int RESULT_ERROR
           
static int RESULT_SUCCESS
           
static int RESULT_WORKING
           
static int STATE_BUSY
           
static int STATE_READY
           
 
Constructor Summary
ProgressMonitor()
           
 
Method Summary
 void cancelAllTasks()
           
 void endProgressMonitorError(Throwable e)
           
 void endProgressMonitorSuccess()
           
 void fullReset()
           
 int getCurrentOperation()
           
 Throwable getException()
           
 String getFileName()
           
 int getPercentDone()
           
 int getResult()
           
 int getState()
           
 long getTotalWork()
           
 long getWorkCompleted()
           
 boolean isCancelAllTasks()
           
 boolean isPause()
           
 void reset()
           
 void setCurrentOperation(int currentOperation)
           
 void setException(Throwable exception)
           
 void setFileName(String fileName)
           
 void setPause(boolean pause)
           
 void setPercentDone(int percentDone)
           
 void setResult(int result)
           
 void setState(int state)
           
 void setTotalWork(long totalWork)
           
 void updateWorkCompleted(long workCompleted)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

ProgressMonitor

public ProgressMonitor()
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)


Copyright © 2012. All Rights Reserved.