class BitmapWriter implements DiskCache.Writer {

	@Override
	public boolean write(File file) {
		FileOutputStream fos = null;
		try {
			fos = new FileOutputStream(file);
			if (bitmap.hasAlpha()) {
				bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
			} else {
				bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fos);
			}
			return true;
		} catch (IOException e) {
			Log.w(TAG, "Could not write bitmap to file", e);
		} finally {
			IOUtils.close(fos);
		}
		return false;
	}

	public  BitmapWriter(Bitmap bitmap);

}