Class HttpDataSource.HttpDataSourceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- com.google.android.exoplayer2.upstream.DataSourceException
-
- com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CronetDataSource.OpenException,HttpDataSource.CleartextNotPermittedException,HttpDataSource.InvalidContentTypeException,HttpDataSource.InvalidResponseCodeException
- Enclosing interface:
- HttpDataSource
public static class HttpDataSource.HttpDataSourceException extends DataSourceException
Thrown when an error is encountered when trying to read from aHttpDataSource.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHttpDataSource.HttpDataSourceException.TypeThe type of operation that produced the error.
-
Field Summary
Fields Modifier and Type Field Description DataSpecdataSpecTheDataSpecassociated with the current connection.@com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type inttypestatic intTYPE_CLOSEThe error occurred in closing aHttpDataSource.static intTYPE_OPENThe error occurred reading data from aHttpDataSource.static intTYPE_READThe error occurred in opening aHttpDataSource.-
Fields inherited from class com.google.android.exoplayer2.upstream.DataSourceException
POSITION_OUT_OF_RANGE, reason
-
-
Constructor Summary
Constructors Constructor Description HttpDataSourceException(DataSpec dataSpec, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)Constructs an HttpDataSourceException.HttpDataSourceException(DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)HttpDataSourceException(IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)Constructs an HttpDataSourceException.HttpDataSourceException(IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)HttpDataSourceException(String message, DataSpec dataSpec, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)Constructs an HttpDataSourceException.HttpDataSourceException(String message, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)HttpDataSourceException(String message, IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)Constructs an HttpDataSourceException.HttpDataSourceException(String message, IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HttpDataSource.HttpDataSourceExceptioncreateForIOException(IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)Returns aHttpDataSourceExceptionwhose error code is assigned according to the cause and type.-
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
-
-
-
-
Field Detail
-
TYPE_OPEN
public static final int TYPE_OPEN
The error occurred reading data from aHttpDataSource.- See Also:
- Constant Field Values
-
TYPE_READ
public static final int TYPE_READ
The error occurred in opening aHttpDataSource.- See Also:
- Constant Field Values
-
TYPE_CLOSE
public static final int TYPE_CLOSE
The error occurred in closing aHttpDataSource.- See Also:
- Constant Field Values
-
type
public final @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type
-
-
Constructor Detail
-
HttpDataSourceException
@Deprecated public HttpDataSourceException(DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
-
HttpDataSourceException
public HttpDataSourceException(DataSpec dataSpec, @ErrorCode @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
Constructs an HttpDataSourceException.- Parameters:
dataSpec- TheDataSpec.errorCode- Reason of the error, should be one of theERROR_CODE_IO_*inPlaybackException.ErrorCode.type- SeeHttpDataSource.HttpDataSourceException.Type.
-
HttpDataSourceException
@Deprecated public HttpDataSourceException(String message, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
-
HttpDataSourceException
public HttpDataSourceException(String message, DataSpec dataSpec, @ErrorCode @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
Constructs an HttpDataSourceException.- Parameters:
message- The error message.dataSpec- TheDataSpec.errorCode- Reason of the error, should be one of theERROR_CODE_IO_*inPlaybackException.ErrorCode.type- SeeHttpDataSource.HttpDataSourceException.Type.
-
HttpDataSourceException
@Deprecated public HttpDataSourceException(IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
-
HttpDataSourceException
public HttpDataSourceException(IOException cause, DataSpec dataSpec, @ErrorCode @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
Constructs an HttpDataSourceException.- Parameters:
cause- The error cause.dataSpec- TheDataSpec.errorCode- Reason of the error, should be one of theERROR_CODE_IO_*inPlaybackException.ErrorCode.type- SeeHttpDataSource.HttpDataSourceException.Type.
-
HttpDataSourceException
@Deprecated public HttpDataSourceException(String message, IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
-
HttpDataSourceException
public HttpDataSourceException(String message, @Nullable IOException cause, DataSpec dataSpec, @ErrorCode @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
Constructs an HttpDataSourceException.- Parameters:
message- The error message.cause- The error cause.dataSpec- TheDataSpec.errorCode- Reason of the error, should be one of theERROR_CODE_IO_*inPlaybackException.ErrorCode.type- SeeHttpDataSource.HttpDataSourceException.Type.
-
-
Method Detail
-
createForIOException
public static HttpDataSource.HttpDataSourceException createForIOException(IOException cause, DataSpec dataSpec, @com.google.android.exoplayer2.upstream.HttpDataSource.HttpDataSourceException.Type int type)
Returns aHttpDataSourceExceptionwhose error code is assigned according to the cause and type.
-
-