public void putBitmap(String url, Bitmap bitmap) { try { mImageCache.putBitmap(createKey(url), bitmap); if (mSecondCache != null) { mSecondCache.putBitmap(createKey(url), bitmap); } } catch (NullPointerException e) { throw new IllegalStateException("Disk Cache Not initialized"); } }