public class ProgressLoggerListener extends java.lang.Object implements DownloadListener
| Constructor and Description |
|---|
ProgressLoggerListener(ProgressLogger logger) |
| Modifier and Type | Method and Description |
|---|---|
static ProgressLoggerListener |
create(Project project,
DownloadSpec spec) |
void |
finish(long totalProcessed)
Marks the download as finished.
|
void |
start(long expectedLen)
The expected length for the download.
|
void |
update(long processedBytes)
Updates the listener on how many bytes have been processed.
|
public void start(long expectedLen)
DownloadListenerstart in interface DownloadListenerexpectedLen - The expected length or -1.public void update(long processedBytes)
DownloadListenerupdate in interface DownloadListenerprocessedBytes - The progress.public void finish(long totalProcessed)
DownloadListenerfinish in interface DownloadListenertotalProcessed - The total number of bytes downloaded.public static ProgressLoggerListener create(Project project, DownloadSpec spec)