public final class

HttpDataSource.InvalidResponseCodeException

extends HttpDataSource.HttpDataSourceException

 java.lang.Object

↳java.lang.Throwable

↳java.lang.Exception

↳java.io.IOException

androidx.media3.datasource.DataSourceException

androidx.media3.datasource.HttpDataSource.HttpDataSourceException

↳androidx.media3.datasource.HttpDataSource.InvalidResponseCodeException

Overview

Thrown when an attempt to open a connection results in a response code not in the 2xx range.

Summary

Fields
public final java.util.Map<java.lang.String, java.util.List>headerFields

An unmodifiable map of the response header fields and values.

public final byte[]responseBody

The response body.

public final intresponseCode

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

public final java.lang.StringresponseMessage

The http status message.

from HttpDataSource.HttpDataSourceExceptiondataSpec, type, TYPE_CLOSE, TYPE_OPEN, TYPE_READ
from DataSourceExceptionPOSITION_OUT_OF_RANGE, reason
Constructors
publicInvalidResponseCodeException(int responseCode, java.lang.String responseMessage, java.io.IOException cause, java.util.Map<java.lang.String, java.util.List> headerFields, DataSpec dataSpec, byte[] responseBody[])

Methods
from HttpDataSource.HttpDataSourceExceptioncreateForIOException
from DataSourceExceptionisCausedByPositionOutOfRange
from java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Fields

public final int responseCode

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

public final java.lang.String responseMessage

The http status message.

public final java.util.Map<java.lang.String, java.util.List> headerFields

An unmodifiable map of the response header fields and values.

public final byte[] responseBody

The response body.

Constructors

public InvalidResponseCodeException(int responseCode, java.lang.String responseMessage, java.io.IOException cause, java.util.Map<java.lang.String, java.util.List> headerFields, DataSpec dataSpec, byte[] responseBody[])