DataSourceException
class DataSourceException : IOException
| kotlin.Any | ||||
| ↳ | kotlin.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | java.io.IOException | |||
| ↳ | androidx.media3.datasource.DataSourceException |
AssetDataSource.AssetDataSourceException |
Thrown when an |
ContentDataSource.ContentDataSourceException |
Thrown when an |
FileDataSource.FileDataSourceException |
Thrown when a |
HttpDataSource.HttpDataSourceException |
Thrown when an error is encountered when trying to read from a |
RawResourceDataSource.RawResourceDataSourceException |
Thrown when an |
UdpDataSource.UdpDataSourceException |
Thrown when an error is encountered when trying to read from a |
CronetDataSource.OpenException |
Thrown when an error is encountered when trying to open a |
HttpDataSource.CleartextNotPermittedException |
Thrown when cleartext HTTP traffic is not permitted. |
HttpDataSource.InvalidContentTypeException |
Thrown when the content type is invalid. |
HttpDataSource.InvalidResponseCodeException |
Thrown when an attempt to open a connection results in a response code not in the 2xx range. |
HttpEngineDataSource.OpenException |
Thrown when an error is encountered when trying to open a |
Used to specify reason of a DataSource error.
Summary
Constants |
|
|---|---|
const Int |
@UnstableApiThis property is deprecated. |
Public constructors |
|---|
|
Constructs a DataSourceException. |
@UnstableApiConstructs a DataSourceException. |
@UnstableApiConstructs a DataSourceException. |
@UnstableApiConstructs a DataSourceException. |
Public functions |
|
|---|---|
java-static Boolean |
Returns whether the given |
Public properties |
|
|---|---|
Int |
The reason of this |
Inherited functions |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
POSITION_OUT_OF_RANGE
@UnstableApi
const val POSITION_OUT_OF_RANGE = 2008: Int
Indicates that the starting position of the request was outside the bounds of the data.
Public constructors
DataSourceException
@UnstableApi
DataSourceException(@PlaybackException.ErrorCode reason: Int)
Constructs a DataSourceException.
| Parameters | |
|---|---|
@PlaybackException.ErrorCode reason: Int |
Reason of the error, should be one of the |
DataSourceException
@UnstableApi
DataSourceException(
cause: Throwable?,
@PlaybackException.ErrorCode reason: Int
)
Constructs a DataSourceException.
| Parameters | |
|---|---|
cause: Throwable? |
The error cause. |
@PlaybackException.ErrorCode reason: Int |
Reason of the error, should be one of the |
DataSourceException
@UnstableApi
DataSourceException(
message: String?,
@PlaybackException.ErrorCode reason: Int
)
Constructs a DataSourceException.
| Parameters | |
|---|---|
message: String? |
The error message. |
@PlaybackException.ErrorCode reason: Int |
Reason of the error, should be one of the |
DataSourceException
@UnstableApi
DataSourceException(
message: String?,
cause: Throwable?,
@PlaybackException.ErrorCode reason: Int
)
Constructs a DataSourceException.
| Parameters | |
|---|---|
message: String? |
The error message. |
cause: Throwable? |
The error cause. |
@PlaybackException.ErrorCode reason: Int |
Reason of the error, should be one of the |
Public functions
isCausedByPositionOutOfRange
@UnstableApi
java-static fun isCausedByPositionOutOfRange(e: IOException!): Boolean
Returns whether the given IOException was caused by a DataSourceException whose reason is ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE in its cause stack.
Public properties
reason
@PlaybackException.ErrorCode
val reason: Int
The reason of this DataSourceException, should be one of the ERROR_CODE_IO_* in PlaybackException.ErrorCode.