com.dropbox.client2
Class ProgressListener.Adjusted

java.lang.Object
  extended by com.dropbox.client2.ProgressListener
      extended by com.dropbox.client2.ProgressListener.Adjusted
Enclosing class:
ProgressListener

public static final class ProgressListener.Adjusted
extends ProgressListener

A progress listener that forwards on to another ProgressListener after adjusting the total and bytes.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.dropbox.client2.ProgressListener
ProgressListener.Adjusted, ProgressListener.ProgressHttpEntity
 
Constructor Summary
ProgressListener.Adjusted(ProgressListener relay, long bytesOffset, long adjustedTotal)
           
 
Method Summary
 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
 

Constructor Detail

ProgressListener.Adjusted

public ProgressListener.Adjusted(ProgressListener relay,
                                 long bytesOffset,
                                 long adjustedTotal)
Method Detail

onProgress

public void onProgress(long bytes,
                       long total)
Description copied from class: ProgressListener
Gets called when some bytes have been transferred since the last time it was called and the progress interval has passed.

Specified by:
onProgress in class ProgressListener
Parameters:
bytes - the number of bytes transferred.
total - the size of the file in bytes.

progressInterval

public long progressInterval()
Description copied from class: ProgressListener
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.

Overrides:
progressInterval in class ProgressListener