List of utility methods to do Cursor Read
void | copyStringToBuffer(Cursor cursor, String columnName, CharArrayBuffer buffer) copy String To Buffer cursor.copyStringToBuffer(cursor.getColumnIndex(columnName), buffer); |
String | extractFilenameFromUri(Uri uri, Activity activity) extract Filename From Uri String fileName = null; if (uri == null) { throw new IllegalArgumentException(); String scheme = uri.getScheme(); String path = uri.getPath(); if (path != null && scheme != null && scheme.equals("file")) { fileName = path.substring(path.lastIndexOf("/") + 1); ... |
byte[] | getBlob(Cursor cursor, String columnName) get Blob return cursor.getBlob(cursor.getColumnIndex(columnName));
|
byte[] | getBlob(String columnName) get Blob return getBlob(cursor, columnName);
|
double | getDouble(Cursor cursor, String columnName) get Double return cursor.getDouble(cursor.getColumnIndex(columnName));
|
double | getDouble(String columnName) get Double return getDouble(cursor, columnName);
|
File | getFileFromUri(Uri uri, Activity activity) get File From Uri String filePath = null; String scheme = uri.getScheme(); filePath = uri.getPath(); if (filePath != null && scheme != null && scheme.equals("file")) { return new File(filePath); String[] projection = { MediaStore.Images.ImageColumns.DATA }; Cursor c = activity.managedQuery(uri, projection, null, null, null); ... |
String | getFileNameFromUri(Uri uri, Activity activity) get File Name From Uri String[] projection = { MediaStore.Images.ImageColumns.DISPLAY_NAME }; String fileName = null; Cursor c = activity.managedQuery(uri, projection, null, null, null); if (c != null && c.moveToFirst()) { fileName = c.getString(0); return fileName; |
float | getFloat(Cursor cursor, String columnName) get Float return cursor.getFloat(cursor.getColumnIndex(columnName));
|
float | getFloat(String columnName) get Float return getFloat(cursor, columnName);
|