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.commons; //from w w w. j a v a 2 s .c om import java.io.File; import android.content.ContentValues; import android.database.sqlite.SQLiteDatabase; import com.dreamteam.app.db.DbManager; import com.dreamteam.app.utils.FileUtils; import com.dreamteam.app.utils.MD5; public class SectionHelper { public static void removeRecord(SQLiteDatabase db, String url) { db.delete(DbManager.SECTION_TABLE_NAME, "url=?", new String[]{url}); db.close(); } public static void insert(SQLiteDatabase db, String tableName, String title, String url) { ContentValues values = new ContentValues(); values.put("table_name", tableName); values.put("title", title); values.put("url", url); db.insert(DbManager.SECTION_TABLE_NAME, null, values); } public static File newSdCache(String url) { String name = AppConfig.APP_SECTION_DIR + File.separator + MD5.Md5(url); return FileUtils.newAbsoluteFile(name); } public static File getSdCache(String url) { return new File(AppConfig.APP_SECTION_DIR + File.separator + MD5.Md5(url)); } }