Android examples for Database:Cursor
safe Close Cursor
//package com.java2s; import android.database.Cursor; import android.util.Log; public class Main { public static void safeClose(Cursor cursor) { if (cursor != null && !cursor.isClosed()) { try { cursor.close();// ww w . ja va2 s . c o m } catch (Exception e) { Log.e("WANXIANG", "Error closing " + cursor.getClass().getSimpleName(), e); } } } }