public Bitmap loadBitmap(String uri,int reqWidth,int reqHeight){
  Bitmap bitmap=loadBitmapFromMemCache(uri);
  if (bitmap != null) {
    Log.d(TAG,"loadBitmapFromMemCache,url:" + uri);
    return bitmap;
  }
  try {
    bitmap=loadBitmapFromDiskCache(uri,reqWidth,reqHeight);
    if (bitmap != null) {
      Log.d(TAG,"loadBitmapFromDisk,url:" + uri);
      return bitmap;
    }
    bitmap=loadBitmapFromHttp(uri,reqWidth,reqHeight);
    Log.d(TAG,"loadBitmapFromHttp,url:" + uri);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (bitmap == null && !mIsDiskLruCacheCreated) {
    Log.w(TAG,"encounter error, DiskLruCache is not created.");
    bitmap=downloadBitmapFromUrl(uri);
  }
  return bitmap;
}

public Bitmap loadBitmap ( String uri , int reqWidth , int reqHeight ) { Bitmap bitmap = loadBitmapFromMemCache ( uri ) ; if ( bitmap != null ) { Log . d ( TAG , "loadBitmapFromMemCache,url:" + uri ) ; return bitmap ; } try { bitmap = loadBitmapFromDiskCache ( uri , reqWidth , reqHeight ) ; if ( bitmap != null ) { Log . d ( TAG , "loadBitmapFromDisk,url:" + uri ) ; return bitmap ; } bitmap = loadBitmapFromHttp ( uri , reqWidth , reqHeight ) ; Log . d ( TAG , "loadBitmapFromHttp,url:" + uri ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } if ( bitmap == null && ! mIsDiskLruCacheCreated ) { Log . w ( TAG , "encounter error, DiskLruCache is not created." ) ; bitmap = downloadBitmapFromUrl ( uri ) ; } return bitmap ; }
load bitmap from memory cache or disk cache or network .
