org.lastbamboo.common.download
Interface RangeDownloader

All Known Implementing Classes:
SingleSourceDownloader

public interface RangeDownloader

Interface for classes that can initiate downloads.


Method Summary
 void download(org.apache.commons.lang.math.LongRange range)
          Downloads the specified range from the assigned file.
 org.littleshoot.util.Optional<Integer> getKbs()
          Gets the speed of this downloader in kilobytes per second.
 long getNumBytesDownloaded()
          Returns the number of bytes downloaded by this downloader.
 long getRangeIndex()
          Accessor for the byte index of the current range.
 long getRangeStartTime()
          Accessor for the time the downloader started downloading the current range.
 URI getSourceUri()
          Returns the source URI for this downloader.
 void issueHeadRequest()
          Sends a head request to the server this downloader is downloading from.
 

Method Detail

getKbs

org.littleshoot.util.Optional<Integer> getKbs()
Gets the speed of this downloader in kilobytes per second.

Returns:
The speed of this downloader in kilobytes per second.

getNumBytesDownloaded

long getNumBytesDownloaded()
Returns the number of bytes downloaded by this downloader.

Returns:
The number of bytes downloaded by this downloader.

download

void download(org.apache.commons.lang.math.LongRange range)
Downloads the specified range from the assigned file.

Parameters:
range - The byte range to download.

issueHeadRequest

void issueHeadRequest()
Sends a head request to the server this downloader is downloading from.


getSourceUri

URI getSourceUri()
Returns the source URI for this downloader.

Returns:
The source URI for this downloader.

getRangeStartTime

long getRangeStartTime()
Accessor for the time the downloader started downloading the current range.

Returns:
The time the downloader started downloading the current range.

getRangeIndex

long getRangeIndex()
Accessor for the byte index of the current range.

Returns:
The byte index for the current range.


Copyright © 2013 LittleShoot. All Rights Reserved.