public static Downloader createCacheDownloader(Context context) {
try {
Class.forName("com.squareup.okhttp.OkHttpClient");
File cacheDir = createDefaultCacheDir(context, CACHE_PATH);
long cacheSize = calculateDiskCacheSize(cacheDir);
return new OkHttpDownloader(cacheDir, cacheSize);
} catch (ClassNotFoundException e) {
return new UrlConnectionDownloader(context);
}
}
Cache.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:photo-paper
作者:
评论列表
文章目录