getURI

open fun getURI(columnIndex: Int): URI

Returns the value of the requested column as a URL.

Note that there are three “URL” classes and you need to choose wisely:

java.net.URL
Java 1.0 class to handle URLs. Tries to resolve the URL on the net. Will hang and throw exception when this fails. Try to avoid if at all possible.
java.net.URI
Java 1.4 replacement for java.net.URL. Use when you need a instance which is java.io.Serializable.
android.net.Uri
Android replacement for java.net.URL. Use when you need a instance which is android.os.Parcelable.

Return

the value of that column as a url or null

Parameters

columnIndex

the zero-based index of the target column.

See also

android.database.Cursor#getString(int)

Throws

value is not an URL