0
ベースクラスを拡張したimageAdapterを使用してイメージをダウンロードしています。私は、彼らがキャッシュ内にあるかどうかを確認するためにテストするのはここのキャッシュ に格納Imがあるキャッシュディレクトリをテストするには?
URI imageUri = null;
//Setting the Uri of aURL to imageUri.
try {
imageUri = aURL.toURI();
} catch (URISyntaxException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
//Testing to see if images are already in cache, if not then we load the images from the web and save them to the cache.
if (new File(new File(myContext.getCacheDir(), "thumbnails"), "" + imageUri.hashCode()).exists())
{
Log.v("Loader", "File exists in cache. Now pulling from the cache");
String cachFile = myContext.getCacheDir() +"/thumbnails/"+imageUri.hashCode();
FileInputStream fis;
私の質問私は、アプリケーション内の別の方法では、このキャッシュディレクトリ」サムネイルをテストする方法を教えてください。
これは正しいことです、私は特定のimageUriをテストしたいのですが、どうすれば別の方法でこれをテストできますか? –
上記のコードでキャッシュの中に入れた画像をテストしたいと思います。キャッシュが存在する期間だけではありません。 –