# CursorKt

Added in 1.1.0

*** ** * ** ***


```
public final class CursorKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final byte[]` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getBlobOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable byte array. |
| `static final https://developer.android.com/reference/java/lang/Double.html` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getDoubleOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable double. |
| `static final https://developer.android.com/reference/java/lang/Float.html` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getFloatOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable float. |
| `static final https://developer.android.com/reference/java/lang/Integer.html` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getIntOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable integer. |
| `static final https://developer.android.com/reference/java/lang/Long.html` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getLongOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable long. |
| `static final https://developer.android.com/reference/java/lang/Short.html` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getShortOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable short. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/database/CursorKt#(android.database.Cursor).getStringOrNull(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html receiver, int index)` Returns the value of the requested column as a nullable string. |

## Public methods

### getBlobOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getBlobOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final byte[] getBlobOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable byte array.

The result and whether this method throws an exception when the column type is not a blob type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getBlob(int)` |   |

### getDoubleOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getDoubleOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final Double getDoubleOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable double.

The result and whether this method throws an exception when the column type is not a floating-point type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getDouble(int)` |   |

### getFloatOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getFloatOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final Float getFloatOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable float.

The result and whether this method throws an exception when the column type is not a floating-point type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getFloat(int)` |   |

### getIntOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getIntOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final Integer getIntOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable integer.

The result and whether this method throws an exception when the column type is not an integral type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getInt(int)` |   |

### getLongOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getLongOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final Long getLongOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable long.

The result and whether this method throws an exception when the column type is not an integral type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getLong(int)` |   |

### getShortOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getShortOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final Short getShortOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable short.

The result and whether this method throws an exception when the column type is not an integral type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getShort(int)` |   |

### getStringOrNull

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/Cursor.kt+function:getStringOrNull) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final String getStringOrNull(@NonNull Cursor receiver, int index)
```

Returns the value of the requested column as a nullable string.

The result and whether this method throws an exception when the column type is not a string type is implementation-defined.

| See also |
|---|---|
| `https://developer.android.com/reference/android/database/Cursor.html#isNull(int)` |   |
| `https://developer.android.com/reference/android/database/Cursor.html#getString(int)` |   |