Class DownloadException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.castlabs.android.player.exceptions.DownloadException
- All Implemented Interfaces:
Serializable
Exception that is raised when media download errors occur. You can
use
getTrackType()
to identify the track that caused the error.- Since:
- 3.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic DownloadException
static DownloadException
byte[]
int
int
getUri()
The underlying URI that caused the error.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
create
-
create
-
getUri
The underlying URI that caused the error. This might be null.- Returns:
- The URI or null
-
getStatusCode
public int getStatusCode()- Returns:
- The response status code or -1
-
getResponseBody
@Nullable public byte[] getResponseBody()- Returns:
- The response body
-
getTrackType
public int getTrackType()- Returns:
- The type of the track that caused the error. One of
PlayerController.VIDEO_RENDERER
,PlayerController.AUDIO_RENDERER
,PlayerController.TEXT_RENDERER
orPlayerController.METADATA_RENDERER
-
getMessage
- Overrides:
getMessage
in classThrowable
-