0
現在,我與這個下面的方法工作,載入圖片:Android將數據存儲到緩存需要多少時間?或者,存儲的最大數據量是多少?
public static Drawable loadCachedImage(String strUrl) {
try {
URL url = new URL(strUrl);
URLConnection connection = url.openConnection();
connection.setUseCaches(true);
Object response = connection.getContent();
if (response instanceof Bitmap) {
Bitmap bitmap = (Bitmap)response;
return new BitmapDrawable(bitmap);
} else {
InputStream is = (InputStream) connection.getContent();
return Drawable.createFromStream(is, "src name");
}
} catch (Exception e) {}
return null;
}
據我所知,它採用Android的默認緩存。所以,我想知道它存儲給定應用信息的時間(或存儲的最大數據大小)。這是一個設置配置嗎?
在此先感謝!