Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#inhconstants) \| [Ctors](https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#pubctors) \| [Methods](https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#inhmethods)

# CrossProcessCursorWrapper

*** ** * ** ***

` public class CrossProcessCursorWrapper `   
` ` ` extends https://developer.android.com/reference/android/database/CursorWrapper ` ` implements https://developer.android.com/reference/android/database/CrossProcessCursor `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.database.CursorWrapper](https://developer.android.com/reference/android/database/CursorWrapper) ||
|   | ↳ | android.database.CrossProcessCursorWrapper |

<br />

*** ** * ** ***

Cursor wrapper that implements `https://developer.android.com/reference/android/database/CrossProcessCursor`.

If the wrapped cursor implements `https://developer.android.com/reference/android/database/CrossProcessCursor`, then the wrapper delegates `https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#fillWindow(int,%20android.database.CursorWindow)`, `https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#getWindow()` and `https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#onMove(int,%20int)` to it. Otherwise, the wrapper provides default implementations of these methods that traverse the contents of the cursor similar to `https://developer.android.com/reference/android/database/AbstractCursor#fillWindow(int,%20android.database.CursorWindow)`.

This wrapper can be used to adapt an ordinary `https://developer.android.com/reference/android/database/Cursor` into a `https://developer.android.com/reference/android/database/CrossProcessCursor`.

<br />

## Summary

### Inherited constants

From interface `https://developer.android.com/reference/android/database/Cursor` `int` `https://developer.android.com/reference/android/database/Cursor#FIELD_TYPE_BLOB`

Value returned by `https://developer.android.com/reference/android/database/Cursor#getType(int)` if the specified column type is blob
`int` `https://developer.android.com/reference/android/database/Cursor#FIELD_TYPE_FLOAT`

Value returned by `https://developer.android.com/reference/android/database/Cursor#getType(int)` if the specified column type is float
`int` `https://developer.android.com/reference/android/database/Cursor#FIELD_TYPE_INTEGER`

Value returned by `https://developer.android.com/reference/android/database/Cursor#getType(int)` if the specified column type is integer
`int` `https://developer.android.com/reference/android/database/Cursor#FIELD_TYPE_NULL`

Value returned by `https://developer.android.com/reference/android/database/Cursor#getType(int)` if the specified column is null
`int` `https://developer.android.com/reference/android/database/Cursor#FIELD_TYPE_STRING`

Value returned by `https://developer.android.com/reference/android/database/Cursor#getType(int)` if the specified column type is string

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#CrossProcessCursorWrapper(android.database.Cursor)(https://developer.android.com/reference/android/database/Cursor cursor) ` Creates a cross process cursor wrapper. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#fillWindow(int,%20android.database.CursorWindow)(int position, https://developer.android.com/reference/android/database/CursorWindow window) ` Copies cursor data into the window. |
| ` https://developer.android.com/reference/android/database/CursorWindow` | ` https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#getWindow()() ` Returns a pre-filled window that contains the data within this cursor. |
| ` boolean` | ` https://developer.android.com/reference/android/database/CrossProcessCursorWrapper#onMove(int,%20int)(int oldPosition, int newPosition) ` This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have. |

### Inherited methods

From class ` https://developer.android.com/reference/android/database/CursorWrapper ` ` void` ` https://developer.android.com/reference/android/database/CursorWrapper#close()() `

Closes the Cursor, releasing all of its resources and making it completely invalid.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#copyStringToBuffer(int,%20android.database.CharArrayBuffer)(int columnIndex, https://developer.android.com/reference/android/database/CharArrayBuffer buffer) `

Retrieves the requested column text and stores it in the buffer provided.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#deactivate()() `

Deactivates the Cursor, making all calls on it fail until `https://developer.android.com/reference/android/database/Cursor#requery()` is called.
` byte[]` ` https://developer.android.com/reference/android/database/CursorWrapper#getBlob(int)(int columnIndex) `

Returns the value of the requested column as a byte array.
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getColumnCount()() `

Return total number of columns
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getColumnIndex(java.lang.String)(https://developer.android.com/reference/java/lang/String columnName) `

Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getColumnIndexOrThrow(java.lang.String)(https://developer.android.com/reference/java/lang/String columnName) `

Returns the zero-based index for the given column name, or throws `https://developer.android.com/reference/java/lang/IllegalArgumentException` if the column doesn't exist.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/database/CursorWrapper#getColumnName(int)(int columnIndex) `

Returns the column name at the given zero-based column index.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/database/CursorWrapper#getColumnNames()() `

Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getCount()() `

Returns the numbers of rows in the cursor.
` double` ` https://developer.android.com/reference/android/database/CursorWrapper#getDouble(int)(int columnIndex) `

Returns the value of the requested column as a double.
` https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/database/CursorWrapper#getExtras()() `

Returns a bundle of extra values.
` float` ` https://developer.android.com/reference/android/database/CursorWrapper#getFloat(int)(int columnIndex) `

Returns the value of the requested column as a float.
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getInt(int)(int columnIndex) `

Returns the value of the requested column as an int.
` long` ` https://developer.android.com/reference/android/database/CursorWrapper#getLong(int)(int columnIndex) `

Returns the value of the requested column as a long.
` https://developer.android.com/reference/android/net/Uri` ` https://developer.android.com/reference/android/database/CursorWrapper#getNotificationUri()() `

Return the URI at which notifications of changes in this Cursor's data will be delivered, as previously set by `https://developer.android.com/reference/android/database/Cursor#setNotificationUri(android.content.ContentResolver,%20android.net.Uri)`.
` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri>` ` https://developer.android.com/reference/android/database/CursorWrapper#getNotificationUris()() `

Return the URIs at which notifications of changes in this Cursor's data will be delivered, as previously set by `https://developer.android.com/reference/android/database/Cursor#setNotificationUris(android.content.ContentResolver,%20java.util.List<android.net.Uri>)`.
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getPosition()() `

Returns the current position of the cursor in the row set.
` short` ` https://developer.android.com/reference/android/database/CursorWrapper#getShort(int)(int columnIndex) `

Returns the value of the requested column as a short.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/database/CursorWrapper#getString(int)(int columnIndex) `

Returns the value of the requested column as a String.
` int` ` https://developer.android.com/reference/android/database/CursorWrapper#getType(int)(int columnIndex) `

Returns data type of the given column's value.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#getWantsAllOnMoveCalls()() `

onMove() will only be called across processes if this method returns true.
` https://developer.android.com/reference/android/database/Cursor` ` https://developer.android.com/reference/android/database/CursorWrapper#getWrappedCursor()() `

Gets the underlying cursor that is wrapped by this instance.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#isAfterLast()() `

Returns whether the cursor is pointing to the position after the last row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#isBeforeFirst()() `

Returns whether the cursor is pointing to the position before the first row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#isClosed()() `

return true if the cursor is closed
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#isFirst()() `

Returns whether the cursor is pointing to the first row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#isLast()() `

Returns whether the cursor is pointing to the last row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#isNull(int)(int columnIndex) `

Returns `true` if the value in the indicated column is null.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#move(int)(int offset) `

Move the cursor by a relative amount, forward or backward, from the current position.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#moveToFirst()() `

Move the cursor to the first row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#moveToLast()() `

Move the cursor to the last row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#moveToNext()() `

Move the cursor to the next row.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#moveToPosition(int)(int position) `

Move the cursor to an absolute position.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#moveToPrevious()() `

Move the cursor to the previous row.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#registerContentObserver(android.database.ContentObserver)(https://developer.android.com/reference/android/database/ContentObserver observer) `

Register an observer that is called when changes happen to the content backing this cursor.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#registerDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) `

Register an observer that is called when changes happen to the contents of the this cursors data set, for example, when the data set is changed via `https://developer.android.com/reference/android/database/Cursor#requery()`, `https://developer.android.com/reference/android/database/Cursor#deactivate()`, or `https://developer.android.com/reference/android/database/Cursor#close()`.
` boolean` ` https://developer.android.com/reference/android/database/CursorWrapper#requery()() `

Performs the query that created the cursor again, refreshing its contents.
` https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/database/CursorWrapper#respond(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) `

This is an out-of-band way for the user of a cursor to communicate with the cursor.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#setExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) `

Sets a `https://developer.android.com/reference/android/os/Bundle` that will be returned by `https://developer.android.com/reference/android/database/Cursor#getExtras()`.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#setNotificationUri(android.content.ContentResolver,%20android.net.Uri)(https://developer.android.com/reference/android/content/ContentResolver cr, https://developer.android.com/reference/android/net/Uri uri) `

Register to watch a content URI for changes.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#setNotificationUris(android.content.ContentResolver,%20java.util.List<android.net.Uri>)(https://developer.android.com/reference/android/content/ContentResolver cr, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri> uris) `

Similar to `https://developer.android.com/reference/android/database/Cursor#setNotificationUri(android.content.ContentResolver,%20android.net.Uri)`, except this version allows to watch multiple content URIs for changes.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#unregisterContentObserver(android.database.ContentObserver)(https://developer.android.com/reference/android/database/ContentObserver observer) `

Unregister an observer that has previously been registered with this cursor via `https://developer.android.com/reference/android/database/Cursor#registerContentObserver(android.database.ContentObserver)`.
` void` ` https://developer.android.com/reference/android/database/CursorWrapper#unregisterDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) `

Unregister an observer that has previously been registered with this cursor via `https://developer.android.com/reference/android/database/Cursor#registerContentObserver(android.database.ContentObserver)`.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/database/Cursor ` ` abstract void` ` https://developer.android.com/reference/android/database/Cursor#close()() `

Closes the Cursor, releasing all of its resources and making it completely invalid.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#copyStringToBuffer(int,%20android.database.CharArrayBuffer)(int columnIndex, https://developer.android.com/reference/android/database/CharArrayBuffer buffer) `

Retrieves the requested column text and stores it in the buffer provided.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#deactivate()() `

*This method was deprecated in API level 16. Since `https://developer.android.com/reference/android/database/Cursor#requery()` is deprecated, so too is this.*
` abstract byte[]` ` https://developer.android.com/reference/android/database/Cursor#getBlob(int)(int columnIndex) `

Returns the value of the requested column as a byte array.
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getColumnCount()() `

Return total number of columns
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getColumnIndex(java.lang.String)(https://developer.android.com/reference/java/lang/String columnName) `

Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getColumnIndexOrThrow(java.lang.String)(https://developer.android.com/reference/java/lang/String columnName) `

Returns the zero-based index for the given column name, or throws `https://developer.android.com/reference/java/lang/IllegalArgumentException` if the column doesn't exist.
` abstract https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/database/Cursor#getColumnName(int)(int columnIndex) `

Returns the column name at the given zero-based column index.
` abstract https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/database/Cursor#getColumnNames()() `

Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getCount()() `

Returns the numbers of rows in the cursor.
` abstract double` ` https://developer.android.com/reference/android/database/Cursor#getDouble(int)(int columnIndex) `

Returns the value of the requested column as a double.
` abstract https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/database/Cursor#getExtras()() `

Returns a bundle of extra values.
` abstract float` ` https://developer.android.com/reference/android/database/Cursor#getFloat(int)(int columnIndex) `

Returns the value of the requested column as a float.
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getInt(int)(int columnIndex) `

Returns the value of the requested column as an int.
` abstract long` ` https://developer.android.com/reference/android/database/Cursor#getLong(int)(int columnIndex) `

Returns the value of the requested column as a long.
` abstract https://developer.android.com/reference/android/net/Uri` ` https://developer.android.com/reference/android/database/Cursor#getNotificationUri()() `

Return the URI at which notifications of changes in this Cursor's data will be delivered, as previously set by `https://developer.android.com/reference/android/database/Cursor#setNotificationUri(android.content.ContentResolver,%20android.net.Uri)`.
` default https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri>` ` https://developer.android.com/reference/android/database/Cursor#getNotificationUris()() `

Return the URIs at which notifications of changes in this Cursor's data will be delivered, as previously set by `https://developer.android.com/reference/android/database/Cursor#setNotificationUris(android.content.ContentResolver,%20java.util.List<android.net.Uri>)`.
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getPosition()() `

Returns the current position of the cursor in the row set.
` abstract short` ` https://developer.android.com/reference/android/database/Cursor#getShort(int)(int columnIndex) `

Returns the value of the requested column as a short.
` abstract https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/database/Cursor#getString(int)(int columnIndex) `

Returns the value of the requested column as a String.
` abstract int` ` https://developer.android.com/reference/android/database/Cursor#getType(int)(int columnIndex) `

Returns data type of the given column's value.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#getWantsAllOnMoveCalls()() `

onMove() will only be called across processes if this method returns true.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#isAfterLast()() `

Returns whether the cursor is pointing to the position after the last row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#isBeforeFirst()() `

Returns whether the cursor is pointing to the position before the first row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#isClosed()() `

return true if the cursor is closed
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#isFirst()() `

Returns whether the cursor is pointing to the first row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#isLast()() `

Returns whether the cursor is pointing to the last row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#isNull(int)(int columnIndex) `

Returns `true` if the value in the indicated column is null.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#move(int)(int offset) `

Move the cursor by a relative amount, forward or backward, from the current position.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#moveToFirst()() `

Move the cursor to the first row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#moveToLast()() `

Move the cursor to the last row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#moveToNext()() `

Move the cursor to the next row.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#moveToPosition(int)(int position) `

Move the cursor to an absolute position.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#moveToPrevious()() `

Move the cursor to the previous row.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#registerContentObserver(android.database.ContentObserver)(https://developer.android.com/reference/android/database/ContentObserver observer) `

Register an observer that is called when changes happen to the content backing this cursor.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#registerDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) `

Register an observer that is called when changes happen to the contents of the this cursors data set, for example, when the data set is changed via `https://developer.android.com/reference/android/database/Cursor#requery()`, `https://developer.android.com/reference/android/database/Cursor#deactivate()`, or `https://developer.android.com/reference/android/database/Cursor#close()`.
` abstract boolean` ` https://developer.android.com/reference/android/database/Cursor#requery()() `

*This method was deprecated in API level 15. Don't use this. Just request a new cursor, so you can do this asynchronously and update your list view once the new cursor comes back.*
` abstract https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/database/Cursor#respond(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) `

This is an out-of-band way for the user of a cursor to communicate with the cursor.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#setExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) `

Sets a `https://developer.android.com/reference/android/os/Bundle` that will be returned by `https://developer.android.com/reference/android/database/Cursor#getExtras()`.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#setNotificationUri(android.content.ContentResolver,%20android.net.Uri)(https://developer.android.com/reference/android/content/ContentResolver cr, https://developer.android.com/reference/android/net/Uri uri) `

Register to watch a content URI for changes.
` default void` ` https://developer.android.com/reference/android/database/Cursor#setNotificationUris(android.content.ContentResolver,%20java.util.List<android.net.Uri>)(https://developer.android.com/reference/android/content/ContentResolver cr, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri> uris) `

Similar to `https://developer.android.com/reference/android/database/Cursor#setNotificationUri(android.content.ContentResolver,%20android.net.Uri)`, except this version allows to watch multiple content URIs for changes.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#unregisterContentObserver(android.database.ContentObserver)(https://developer.android.com/reference/android/database/ContentObserver observer) `

Unregister an observer that has previously been registered with this cursor via `https://developer.android.com/reference/android/database/Cursor#registerContentObserver(android.database.ContentObserver)`.
` abstract void` ` https://developer.android.com/reference/android/database/Cursor#unregisterDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) `

Unregister an observer that has previously been registered with this cursor via `https://developer.android.com/reference/android/database/Cursor#registerContentObserver(android.database.ContentObserver)`.
From interface ` https://developer.android.com/reference/android/database/CrossProcessCursor ` ` abstract void` ` https://developer.android.com/reference/android/database/CrossProcessCursor#fillWindow(int,%20android.database.CursorWindow)(int position, https://developer.android.com/reference/android/database/CursorWindow window) `

Copies cursor data into the window.
` abstract https://developer.android.com/reference/android/database/CursorWindow` ` https://developer.android.com/reference/android/database/CrossProcessCursor#getWindow()() `

Returns a pre-filled window that contains the data within this cursor.
` abstract boolean` ` https://developer.android.com/reference/android/database/CrossProcessCursor#onMove(int,%20int)(int oldPosition, int newPosition) `

This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have.
From interface ` https://developer.android.com/reference/java/io/Closeable ` ` abstract void` ` https://developer.android.com/reference/java/io/Closeable#close()() `

Closes this stream and releases any system resources associated with it.
From interface ` https://developer.android.com/reference/java/lang/AutoCloseable ` ` abstract void` ` https://developer.android.com/reference/java/lang/AutoCloseable#close()() `

Closes this resource, relinquishing any underlying resources.

## Public constructors

### CrossProcessCursorWrapper

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CrossProcessCursorWrapper (Cursor cursor)
```

Creates a cross process cursor wrapper.

<br />

| Parameters ||
|---|---|
| `cursor` | `Cursor`: The underlying cursor to wrap. <br /> |

## Public methods

### fillWindow

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void fillWindow (int position, 
                CursorWindow window)
```

Copies cursor data into the window.

Clears the window and fills it with data beginning at the requested row position until all of the data in the cursor is exhausted or the window runs out of space.

The filled window uses the same row indices as the original cursor. For example, if you fill a window starting from row 5 from the cursor, you can query the contents of row 5 from the window just by asking it for row 5 because there is a direct correspondence between the row indices used by the cursor and the window.

The current position of the cursor, as returned by `https://developer.android.com/reference/android/database/Cursor#getPosition()`, is not changed by this method.

<br />

<br />

| Parameters ||
|---|---|
| `position` | `int`: The zero-based index of the first row to copy into the window. <br /> |
| `window` | `CursorWindow`: The window to fill. <br /> |

### getWindow

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CursorWindow getWindow ()
```

Returns a pre-filled window that contains the data within this cursor.

In particular, the window contains the row indicated by `https://developer.android.com/reference/android/database/Cursor#getPosition()`. The window's contents are automatically scrolled whenever the current row moved outside the range covered by the window.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/database/CursorWindow` | The pre-filled window, or null if none. <br /> |

### onMove

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onMove (int oldPosition, 
                int newPosition)
```

This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have. If it returns false the move function will also do so and the cursor will scroll to the beforeFirst position.

This function should be called by methods such as `https://developer.android.com/reference/android/database/Cursor#moveToPosition(int)`, so it will typically not be called from outside of the cursor class itself.

<br />

<br />

| Parameters ||
|---|---|
| `oldPosition` | `int`: The position that we're moving from. <br /> |
| `newPosition` | `int`: The position that we're moving to. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the move is successful, false otherwise. <br /> |