Skip to content

Commit

Permalink
Remove unused saveImageInFileCache method
Browse files Browse the repository at this point in the history
  • Loading branch information
nikreiman committed Feb 1, 2012
1 parent c67c9d5 commit 7389dba
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions src/com/wrapp/android/webimage/ImageCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,33 +162,7 @@ private static void saveImageInMemoryCache(String imageKey, final Bitmap bitmap)
}
}

public static void saveImageInFileCache(final Context context, String imageKey, final Bitmap bitmap) {
OutputStream outputStream = null;

try {
File cacheFile = new File(getCacheDirectory(context), imageKey);
outputStream = new FileOutputStream(cacheFile);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);
LogWrapper.logMessage("Saved image " + imageKey + " to file cache");
outputStream.flush();
}
catch(IOException e) {
LogWrapper.logException(e);
}
finally {
try {
if(outputStream != null) {
outputStream.close();
}
}
catch(IOException e) {
LogWrapper.logException(e);
}
}
}


private static File getCacheDirectory(final Context context) {
public static File getCacheDirectory(final Context context) {
if(cacheDirectory == null) {
setCacheDirectory(context, DEFAULT_CACHE_SUBDIRECTORY_NAME);
}
Expand Down

0 comments on commit 7389dba

Please sign in to comment.