Android Cursor Put putToWindowPreHoneycomb(Cursor cursor, int i, CursorWindow window, int position)

Here you can find the source of putToWindowPreHoneycomb(Cursor cursor, int i, CursorWindow window, int position)

Description

This solution is consistent with how Gingerbread implemented android.database.AbstractCursor#fillWindow(int,android.database.CursorWindow) .

License

Apache License

Declaration

private static boolean putToWindowPreHoneycomb(Cursor cursor, int i,
        CursorWindow window, int position) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import android.database.Cursor;
import android.database.CursorWindow;

public class Main {
    /**//from  w w  w.j a  v a  2  s. co m
     * This solution is consistent with how Gingerbread implemented
     * {@link android.database.AbstractCursor#fillWindow(int, android.database.CursorWindow)}.
     */
    private static boolean putToWindowPreHoneycomb(Cursor cursor, int i,
            CursorWindow window, int position) {
        String value = cursor.getString(i);
        final boolean success;
        if (value != null) {
            success = window.putString(value, position, i);
        } else {
            success = window.putNull(position, i);
        }
        return success;
    }
}

Related

  1. putToWindow(Cursor cursor, int column, CursorWindow window, int row)
  2. putToWindowHoneycombAndBeyond(Cursor cursor, int i, CursorWindow window, int position)
  3. cursorFillWindow(final Cursor cursor, int position, final CursorWindow window)