Added in API level 1

AbstractWindowedCursor


abstract class AbstractWindowedCursor : AbstractCursor
kotlin.Any
   ↳ android.database.AbstractCursor
   ↳ android.database.AbstractWindowedCursor

A base class for Cursors that store their data in CursorWindows.

The cursor owns the cursor window it uses. When the cursor is closed, its window is also closed. Likewise, when the window used by the cursor is changed, its old window is closed. This policy of strict ownership ensures that cursor windows are not leaked.

Subclasses are responsible for filling the cursor window with data during onMove(int,int), allocating a new cursor window if necessary. During requery(), the existing cursor window should be cleared and filled with new data.

If the contents of the cursor change or become invalid, the old window must be closed (because it is owned by the cursor) and set to null.

Summary

Public constructors

Public methods
open Unit
copyStringToBuffer(columnIndex: Int, buffer: CharArrayBuffer!)

open ByteArray!
getBlob(columnIndex: Int)

open Double
getDouble(columnIndex: Int)

open Float
getFloat(columnIndex: Int)

open Int
getInt(columnIndex: Int)

open Long
getLong(columnIndex: Int)

open Short
getShort(columnIndex: Int)

open String!
getString(columnIndex: Int)

open Int
getType(columnIndex: Int)

open CursorWindow!

open Boolean

Returns true if the cursor has an associated cursor window.

open Boolean
isBlob(columnIndex: Int)

open Boolean
isFloat(columnIndex: Int)

open Boolean
isLong(columnIndex: Int)

open Boolean
isNull(columnIndex: Int)

open Boolean
isString(columnIndex: Int)

open Unit

Sets a new cursor window for the cursor to use.

Protected methods
open Unit

Inherited functions
Properties
CursorWindow!

The cursor window owned by this cursor.

Inherited properties

Public constructors

AbstractWindowedCursor

AbstractWindowedCursor()

Public methods

copyStringToBuffer

Added in API level 1
open fun copyStringToBuffer(
    columnIndex: Int,
    buffer: CharArrayBuffer!
): Unit
Parameters
columnIndex Int: the zero-based index of the target column. if the target column is null, return buffer Value is 0 or greater
buffer CharArrayBuffer!: the buffer to copy the text into.

getBlob

Added in API level 1
open fun getBlob(columnIndex: Int): ByteArray!
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
ByteArray! the value of that column as a byte array.

getDouble

Added in API level 1
open fun getDouble(columnIndex: Int): Double
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Double the value of that column as a double.

getFloat

Added in API level 1
open fun getFloat(columnIndex: Int): Float
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Float the value of that column as a float.

getInt

Added in API level 1
open fun getInt(columnIndex: Int): Int
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Int the value of that column as an int.

getLong

Added in API level 1
open fun getLong(columnIndex: Int): Long
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Long the value of that column as a long.

getShort

Added in API level 1
open fun getShort(columnIndex: Int): Short
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Short the value of that column as a short.

getString

Added in API level 1
open fun getString(columnIndex: Int): String!
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
String! the value of that column as a String.

getType

Added in API level 11
open fun getType(columnIndex: Int): Int
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Int column value type Value is android.database.Cursor#FIELD_TYPE_NULL, android.database.Cursor#FIELD_TYPE_INTEGER, android.database.Cursor#FIELD_TYPE_FLOAT, android.database.Cursor#FIELD_TYPE_STRING, or android.database.Cursor#FIELD_TYPE_BLOB

getWindow

Added in API level 1
open fun getWindow(): CursorWindow!
Return
CursorWindow! The pre-filled window that backs this cursor, or null if none.

hasWindow

Added in API level 1
open fun hasWindow(): Boolean

Returns true if the cursor has an associated cursor window.

Return
Boolean True if the cursor has an associated cursor window.

isBlob

Added in API level 1
Deprecated in API level 15
open fun isBlob(columnIndex: Int): Boolean

Deprecated: Use #getType

isFloat

Added in API level 5
Deprecated in API level 15
open fun isFloat(columnIndex: Int): Boolean

Deprecated: Use #getType

isLong

Added in API level 5
Deprecated in API level 15
open fun isLong(columnIndex: Int): Boolean

Deprecated: Use #getType

isNull

Added in API level 1
open fun isNull(columnIndex: Int): Boolean
Parameters
columnIndex Int: the zero-based index of the target column. Value is 0 or greater
Return
Boolean whether the column value is null.

isString

Added in API level 5
Deprecated in API level 15
open fun isString(columnIndex: Int): Boolean

Deprecated: Use #getType

setWindow

Added in API level 1
open fun setWindow(window: CursorWindow!): Unit

Sets a new cursor window for the cursor to use.

The cursor takes ownership of the provided cursor window; the cursor window will be closed when the cursor is closed or when the cursor adopts a new cursor window.

If the cursor previously had a cursor window, then it is closed when the new cursor window is assigned.

Parameters
window CursorWindow!: The new cursor window, typically a remote cursor window.

Protected methods

checkPosition

Added in API level 1
protected open fun checkPosition(): Unit
Exceptions
android.database.CursorIndexOutOfBoundsException

Properties

mWindow

Added in API level 1
protected var mWindow: CursorWindow!

The cursor window owned by this cursor.