public ImageCache(String filePath, String secondFilePath) { memoryCache = new HashMap<CachedImageKey, CachedImage>(60, 1.0f); if (StringUtil.isNotBlank(filePath)) { ImageCache.filePath = filePath; } if (StringUtil.isNotBlank(secondFilePath)) { ImageCache.secondaryFilePath = secondFilePath; } File cacheFile = new File(ImageCache.filePath); if (!cacheFile.exists()) { cacheFile.mkdir(); } for (String folder : IMAGE_FOLDER) { File file = new File(ImageCache.filePath + File.separator + folder); if (!file.exists()) { file.mkdirs(); } file = new File(ImageCache.secondaryFilePath + File.separator + folder); if (!file.exists()) { file.mkdirs(); } } getCacheHeap(); }