Add a javadoc explanation for ProgressiveDownloader that explains that it tries to skip downloading already cached bytes.

download calls through to CacheUtil#cache, which handles skipping already downloaded bytes.

It is useful for callers to know that ProgressiveDownloader has this behavior - otherwise, they might reimplement the logic themselves.

I hope this behavior is something that can be part of the public API :)

PiperOrigin-RevId: 274202995
This commit is contained in:
olly 2019-10-11 18:42:44 +01:00 committed by Oliver Woodman
parent 1c66010b4a
commit ce01c79e01

View file

@ -29,6 +29,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
* A downloader for progressive media streams.
*
* <p>The downloader attempts to download the entire media bytes referenced by a {@link Uri} into a
* cache as defined by {@link DownloaderConstructorHelper}. Callers can use the constructor to
* specify a custom cache key for the downloaded bytes.
*
* <p>The downloader will avoid downloading already-downloaded media bytes.
*/
public final class ProgressiveDownloader implements Downloader {