Class BlocklistException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.castlabs.android.player.exceptions.BlocklistException
- All Implemented Interfaces:
Serializable
Exception thrown when a track is blocklisted.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal long
The duration of the blocklisted track in milliseconds.final com.google.android.exoplayer2.Format
The format of the blocklisted track.final int
The reason why the track was blocklisted. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlocklistException
Creates a new BlocklistException.Returns a string representation of the reason why the track was blocklisted.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
reason
public final int reasonThe reason why the track was blocklisted. -
format
@NonNull public final com.google.android.exoplayer2.Format formatThe format of the blocklisted track. -
durationMs
public final long durationMsThe duration of the blocklisted track in milliseconds.
-
-
Method Details
-
create
@NonNull public static BlocklistException create(int reason, @NonNull String message, @NonNull com.google.android.exoplayer2.Format format, long durationMs) Creates a new BlocklistException.- Parameters:
reason
- The reason why the track was blocklisted.message
- A message describing the reason for the blocklisting.format
- The format of the blocklisted track.durationMs
- The duration of the blocklisted track in milliseconds.- Returns:
- A new BlocklistException.
-
reasonString
Returns a string representation of the reason why the track was blocklisted.- Returns:
- A string representation of the reason.
-