ParserException
@UnstableApi
public class ParserException extends IOException
| java.lang.Object | ||||
| ↳ | kotlin.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | java.io.IOException | |||
| ↳ | androidx.media3.common.ParserException |
SsManifestParser.MissingFieldException |
Thrown if a required field is missing. |
UnrecognizedInputFormatException |
Thrown if the input format was not recognized. |
Thrown when an error occurs parsing media data and metadata.
Summary
Public fields |
|
|---|---|
final boolean |
Whether the parsing error was caused by a bitstream not following the expected format. |
final int |
The |
Protected constructors |
|---|
ParserException( |
Public methods |
|
|---|---|
static ParserException |
createForMalformedContainer(Creates a new instance for which |
static ParserException |
createForMalformedDataOfUnknownType(Creates a new instance for which |
static ParserException |
createForMalformedManifest(Creates a new instance for which |
static ParserException |
createForManifestWithUnsupportedFeature(Creates a new instance for which |
static ParserException |
Creates a new instance for which |
String |
Inherited methods |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public fields
contentIsMalformed
public final boolean contentIsMalformed
Whether the parsing error was caused by a bitstream not following the expected format. May be false when a parser encounters a legal condition which it does not support.
Protected constructors
ParserException
protected ParserException(
@Nullable String message,
@Nullable Throwable cause,
boolean contentIsMalformed,
@C.DataType int dataType
)
Public methods
createForMalformedContainer
public static ParserException createForMalformedContainer(
@Nullable String message,
@Nullable Throwable cause
)
Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MEDIA.
| Returns | |
|---|---|
ParserException |
The created instance. |
createForMalformedDataOfUnknownType
public static ParserException createForMalformedDataOfUnknownType(
@Nullable String message,
@Nullable Throwable cause
)
Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_UNKNOWN.
| Returns | |
|---|---|
ParserException |
The created instance. |
createForMalformedManifest
public static ParserException createForMalformedManifest(
@Nullable String message,
@Nullable Throwable cause
)
Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MANIFEST.
| Returns | |
|---|---|
ParserException |
The created instance. |
createForManifestWithUnsupportedFeature
public static ParserException createForManifestWithUnsupportedFeature(
@Nullable String message,
@Nullable Throwable cause
)
Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MANIFEST.
| Returns | |
|---|---|
ParserException |
The created instance. |
createForUnsupportedContainerFeature
public static ParserException createForUnsupportedContainerFeature(@Nullable String message)
Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MEDIA.
| Parameters | |
|---|---|
@Nullable String message |
See |
| Returns | |
|---|---|
ParserException |
The created instance. |