Here you can find the source of putToWindowHoneycombAndBeyond(Cursor cursor, int i, CursorWindow window, int position)
private static boolean putToWindowHoneycombAndBeyond(Cursor cursor, int i, CursorWindow window, int position)
//package com.java2s; //License from project: Apache License import android.database.Cursor; import android.database.CursorWindow; public class Main { private static boolean putToWindowHoneycombAndBeyond(Cursor cursor, int i, CursorWindow window, int position) { final int type = cursor.getType(i); final boolean success; switch (type) { case Cursor.FIELD_TYPE_NULL: success = window.putNull(position, i); break; case Cursor.FIELD_TYPE_INTEGER: success = window.putLong(cursor.getLong(i), position, i); break; case Cursor.FIELD_TYPE_FLOAT: success = window.putDouble(cursor.getDouble(i), position, i); break; case Cursor.FIELD_TYPE_BLOB: { final byte[] value = cursor.getBlob(i); success = value != null ? window.putBlob(value, position, i) : window.putNull(position, i); break; }//www . ja v a 2 s . c om default: // assume value is convertible to String case Cursor.FIELD_TYPE_STRING: { final String value = cursor.getString(i); success = value != null ? window.putString(value, position, i) : window.putNull(position, i); break; } } return success; } }