public interface Downloader
| Modifier and Type | Interface and Description |
|---|---|
static class |
Downloader.Response
Response stream or bitmap and info.
|
static class |
Downloader.ResponseException
Thrown for non-2XX responses.
|
| Modifier and Type | Method and Description |
|---|---|
Downloader.Response |
load(android.net.Uri uri,
int networkPolicy)
Download the specified image
url from the internet. |
void |
shutdown()
Allows to perform a clean up for this
Downloader including closing the disk cache and
other resources. |
Downloader.Response load(android.net.Uri uri, int networkPolicy) throws IOException
url from the internet.uri - Remote image URL.networkPolicy - The NetworkPolicy used for this request.Downloader.Response containing either a Bitmap representation of the request or an
InputStream for the image data. null can be returned to indicate a problem
loading the bitmap.IOException - if the requested URL cannot successfully be loaded.void shutdown()
Downloader including closing the disk cache and
other resources.Copyright © 2013–2016 Square, Inc.. All rights reserved.