public final class OkHttp3Downloader extends Object implements com.squareup.picasso.Downloader
| Constructor and Description |
|---|
OkHttp3Downloader(okhttp3.Call.Factory client) |
OkHttp3Downloader(android.content.Context context)
Create new downloader that uses OkHttp.
|
OkHttp3Downloader(android.content.Context context,
long maxSize)
Create new downloader that uses OkHttp.
|
OkHttp3Downloader(File cacheDir)
Create new downloader that uses OkHttp.
|
OkHttp3Downloader(File cacheDir,
long maxSize)
Create new downloader that uses OkHttp.
|
OkHttp3Downloader(okhttp3.OkHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
static okhttp3.Cache |
createDefaultCache(android.content.Context context)
Creates a
Cache that would have otherwise been created by calling
OkHttp3Downloader(Context). |
com.squareup.picasso.Downloader.Response |
load(android.net.Uri uri,
int networkPolicy) |
void |
shutdown() |
public OkHttp3Downloader(android.content.Context context)
public OkHttp3Downloader(File cacheDir)
cacheDir - The directory in which the cache should be storedpublic OkHttp3Downloader(android.content.Context context,
long maxSize)
maxSize - The size limit for the cache.public OkHttp3Downloader(File cacheDir, long maxSize)
cacheDir - The directory in which the cache should be storedmaxSize - The size limit for the cache.public OkHttp3Downloader(okhttp3.OkHttpClient client)
public OkHttp3Downloader(okhttp3.Call.Factory client)
public static okhttp3.Cache createDefaultCache(android.content.Context context)
Cache that would have otherwise been created by calling
OkHttp3Downloader(Context). This allows you to build your own OkHttpClient
while still getting the default disk cache.public com.squareup.picasso.Downloader.Response load(android.net.Uri uri,
int networkPolicy)
throws IOException
load in interface com.squareup.picasso.DownloaderIOExceptionpublic void shutdown()
shutdown in interface com.squareup.picasso.DownloaderCopyright © 2016. All Rights Reserved.