com.dropbox.client2
Class ProgressListener
java.lang.Object
com.dropbox.client2.ProgressListener
public abstract class ProgressListener
- extends Object
Receives file transfer progress updates for some API calls, e.g. getFile and
putFile.
|
Method Summary |
abstract void |
onProgress(long bytes,
long total)
Gets called when some bytes have been transferred since the last time it
was called and the progress interval has passed. |
long |
progressInterval()
Should return how often transferred bytes should be reported to this
listener, in milliseconds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProgressListener
public ProgressListener()
onProgress
public abstract void onProgress(long bytes,
long total)
- Gets called when some bytes have been transferred since the last time it
was called and the progress interval has passed.
- Parameters:
bytes - the number of bytes transferred.total - the size of the file in bytes.
progressInterval
public long progressInterval()
- Should return how often transferred bytes should be reported to this
listener, in milliseconds. It is not guaranteed that updates will happen
at this exact interval, but that at least this amount of time will pass
between updates. The default implementation always returns 500
milliseconds.
Copyright © 2012. All Rights Reserved.