Back to project page SimpleReader.
The source code is released under:
Apache License
If you think the Android project SimpleReader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.dreamteam.app.img; /*w w w. j a v a2 s .co m*/ import java.io.File; import java.io.IOException; import android.content.Context; import android.util.Log; public class FileCache { private String cacheDir; public FileCache(Context context) { cacheDir = FileCacheManager.getChcheDir(context); Log.d("FileCache", cacheDir); } public File getCacheFile(String url) { File file = new File(cacheDir + "/" + url.hashCode()); if(file.exists()) { return file; }else { return null; } } public String getCacheDir() { return cacheDir; } public void clear() { FileCacheManager.deleteDirectory(cacheDir); } public boolean createCacheFile(String url) { boolean result = false; File file = new File(cacheDir + "/" + url.hashCode()); try { result = file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } return result; } }