Back to Exoplayer

HttpDataSource.InvalidResponseCodeException (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.InvalidResponseCodeException.html

latest6.4 KB
Original Source

Package com.google.android.exoplayer2.upstream

Class HttpDataSource.InvalidResponseCodeException


public static final classHttpDataSource.InvalidResponseCodeExceptionextends[HttpDataSource.HttpDataSourceException](HttpDataSource.HttpDataSourceException.html "class in com.google.android.exoplayer2.upstream")

Thrown when an attempt to open a connection results in a response code not in the 2xx range. See Also:Serialized Form

Nested Class Summary

- 

Nested classes/interfaces inherited from class com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException

HttpDataSource.HttpDataSourceException.Type

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | Map<String,​List<String>> | headerFields | An unmodifiable map of the response header fields and values. | | byte[] | responseBody | The response body. | | int | responseCode | The response code that was outside of the 2xx range. | | String | responseMessage | The http status message. |

- 

Fields inherited from class com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException

dataSpec, type, TYPE_CLOSE, TYPE_OPEN, TYPE_READ

- 

Fields inherited from class com.google.android.exoplayer2.upstream.DataSourceException

POSITION_OUT_OF_RANGE, reason

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | InvalidResponseCodeException​(int responseCode, String responseMessage, IOException cause, Map<String,​List<String>> headerFields, DataSpec dataSpec, byte[] responseBody) | |

Method Summary

- 

Methods inherited from class com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException

createForIOException

- 

Methods inherited from class com.google.android.exoplayer2.upstream.DataSourceException

isCausedByPositionOutOfRange

- 

Methods inherited from class java.lang.Throwable

addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

- 

responseCode

public final int responseCode

The response code that was outside of the 2xx range.

- 

responseMessage

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")responseMessage

The http status message.

- 

headerFields

public final[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​[List](https://developer.android.com/reference/java/util/List.html?is-external=true "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")>> headerFields

An unmodifiable map of the response header fields and values.

- 

responseBody

public final byte[] responseBody

The response body.

Constructor Detail

- 

InvalidResponseCodeException

public InvalidResponseCodeException​(int responseCode,
                                    @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")responseMessage,
                                    @Nullable[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")cause,[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​[List](https://developer.android.com/reference/java/util/List.html?is-external=true "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")>> headerFields,[DataSpec](DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec,
                                    byte[] responseBody)