Class DataSourceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- com.google.android.exoplayer2.upstream.DataSourceException
-
- All Implemented Interfaces:
Serializable
public final class DataSourceException extends IOException
Used to specify reason of a DataSource error.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intPOSITION_OUT_OF_RANGEIndicates that thestarting positionof the request was outside the bounds of the data.intreasonThe reason of thisDataSourceException.
-
Constructor Summary
Constructors Constructor Description DataSourceException(int reason)Constructs a DataSourceException.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisCausedByPositionOutOfRange(IOException e)Returns whether the givenIOExceptionwas caused by aDataSourceExceptionwhosereasonisPOSITION_OUT_OF_RANGEin its cause stack.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
POSITION_OUT_OF_RANGE
public static final int POSITION_OUT_OF_RANGE
Indicates that thestarting positionof the request was outside the bounds of the data.- See Also:
- Constant Field Values
-
reason
public final int reason
The reason of thisDataSourceException. It can only bePOSITION_OUT_OF_RANGE.
-
-
Constructor Detail
-
DataSourceException
public DataSourceException(int reason)
Constructs a DataSourceException.- Parameters:
reason- Reason of the error. It can only bePOSITION_OUT_OF_RANGE.
-
-
Method Detail
-
isCausedByPositionOutOfRange
public static boolean isCausedByPositionOutOfRange(IOException e)
Returns whether the givenIOExceptionwas caused by aDataSourceExceptionwhosereasonisPOSITION_OUT_OF_RANGEin its cause stack.
-
-