public static class MultipartStream.ProgressNotifier
extends java.lang.Object
ProgressListener
.Modifier and Type | Field and Description |
---|---|
private long |
bytesRead
Number of bytes, which have been read so far.
|
private long |
contentLength
Number of expected bytes, if known, or -1.
|
private int |
items
Number of items, which have been read so far.
|
private ProgressListener |
listener
The listener to invoke.
|
Constructor and Description |
---|
ProgressNotifier(ProgressListener pListener,
long pContentLength)
Creates a new instance with the given listener
and content length.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
noteBytesRead(int pBytes)
Called to indicate that bytes have been read.
|
(package private) void |
noteItem()
Called to indicate, that a new file item has been detected.
|
private void |
notifyListener()
Called for notifying the listener.
|
private final ProgressListener listener
private final long contentLength
private long bytesRead
private int items
ProgressNotifier(ProgressListener pListener, long pContentLength)
pListener
- The listener to invoke.pContentLength
- The expected content length.void noteBytesRead(int pBytes)
pBytes
- Number of bytes, which have been read.void noteItem()
private void notifyListener()