|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lastbamboo.common.download.RangeTrackerAdapter
public class RangeTrackerAdapter
Adapter for a range tracker.
| Constructor Summary | |
|---|---|
RangeTrackerAdapter()
|
|
| Method Summary | |
|---|---|
long |
getBytesRead()
Accessor for the number of bytes read. |
org.littleshoot.util.Optional<org.apache.commons.lang.math.LongRange> |
getNextRange()
Gets the next range to download. |
int |
getNumChunks()
Accessor for the number of chunks to download. |
boolean |
hasMoreRanges()
Returns whether or not there are available ranges to download. |
void |
onRangeComplete(org.apache.commons.lang.math.LongRange range)
Called when we've completed downloading the specified range. |
void |
onRangeFailed(org.apache.commons.lang.math.LongRange range)
Called when the attempt to download the specified range has failed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RangeTrackerAdapter()
| Method Detail |
|---|
public long getBytesRead()
RangeTracker
getBytesRead in interface RangeTrackerpublic org.littleshoot.util.Optional<org.apache.commons.lang.math.LongRange> getNextRange()
RangeTracker
getNextRange in interface RangeTrackerpublic int getNumChunks()
RangeTracker
getNumChunks in interface RangeTrackerpublic boolean hasMoreRanges()
RangeTracker
hasMoreRanges in interface RangeTrackertrue if there are more ranges to download,
otherwise false.public void onRangeComplete(org.apache.commons.lang.math.LongRange range)
RangeTracker
onRangeComplete in interface RangeTrackerrange - The completed range.public void onRangeFailed(org.apache.commons.lang.math.LongRange range)
RangeTracker
onRangeFailed in interface RangeTrackerrange - The range that could not be downloaded.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||