Class BLProgressCounter
java.lang.Object
com.io7m.brooklime.vanilla.internal.BLProgressCounter
A progress counter.
-
Constructor Summary
ConstructorsConstructorDescriptionBLProgressCounter(Clock inClock, BLProgressReceiverType inReceiver) A progress counter. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSizeReceived(long extra) Add a number of bytes.voidsetSizeReceived(long size) Set the currently received number of bytes.voidstartFile(String inName, long inSizeExpected, int inAttemptIndex, int inAttemptMaximum, int inFileIndex, int inFileCount) Start a new file.
-
Constructor Details
-
BLProgressCounter
A progress counter.- Parameters:
inClock- The clock used to track timeinReceiver- The progress receiver
-
-
Method Details
-
addSizeReceived
public void addSizeReceived(long extra) Add a number of bytes.- Parameters:
extra- The byte count
-
startFile
public void startFile(String inName, long inSizeExpected, int inAttemptIndex, int inAttemptMaximum, int inFileIndex, int inFileCount) Start a new file.- Parameters:
inName- The file nameinSizeExpected- The expected sizeinAttemptIndex- The attempt numberinAttemptMaximum- The maximum number of attemptsinFileIndex- The file indexinFileCount- The number of files
-
setSizeReceived
public void setSizeReceived(long size) Set the currently received number of bytes.- Parameters:
size- The size
-