Example usage for android.database AbstractWindowedCursor isBlob

List of usage examples for android.database AbstractWindowedCursor isBlob

Introduction

In this page you can find the example usage for android.database AbstractWindowedCursor isBlob.

Prototype

@Deprecated
public boolean isBlob(int columnIndex) 

Source Link

Usage

From source file:android.database.DatabaseUtils.java

/**
 * Read the entire contents of a cursor row and store them in a ContentValues.
 *
 * @param cursor the cursor to read from.
 * @param values the {@link ContentValues} to put the row into.
 *//*w ww  . ja v a2  s. com*/
public static void cursorRowToContentValues(Cursor cursor, ContentValues values) {
    AbstractWindowedCursor awc = (cursor instanceof AbstractWindowedCursor) ? (AbstractWindowedCursor) cursor
            : null;

    String[] columns = cursor.getColumnNames();
    int length = columns.length;
    for (int i = 0; i < length; i++) {
        if (awc != null && awc.isBlob(i)) {
            values.put(columns[i], cursor.getBlob(i));
        } else {
            values.put(columns[i], cursor.getString(i));
        }
    }
}