UnrecognizedInputFormatException


@UnstableApi
public class UnrecognizedInputFormatException extends ParserException


Thrown if the input format was not recognized.

Summary

Public fields

final ImmutableList<SniffFailure>

Sniff failures from getSniffFailureDetails from any extractors that were checked while trying to recognize the input data.

final Uri

The Uri from which the unrecognized data was read.

Public constructors

@InlineMe(replacement = "this(message, uri, ImmutableList.of())", imports = "com.google.common.collect.ImmutableList")
UnrecognizedInputFormatException(String message, Uri uri)

This method is deprecated.

Use UnrecognizedInputFormatException instead.

UnrecognizedInputFormatException(
    String message,
    Uri uri,
    List<SniffFailure> sniffFailures
)

Constructs a new instance.

Inherited fields

From androidx.media3.common.ParserException
final boolean

Whether the parsing error was caused by a bitstream not following the expected format.

final int

The data type of the parsed bitstream.

Inherited methods

From androidx.media3.common.ParserException
static ParserException
createForMalformedContainer(
    @Nullable String message,
    @Nullable Throwable cause
)

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MEDIA.

static ParserException

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_UNKNOWN.

static ParserException
createForMalformedManifest(
    @Nullable String message,
    @Nullable Throwable cause
)

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MANIFEST.

static ParserException

Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MANIFEST.

static ParserException

Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MEDIA.

@Nullable String
From java.lang.Throwable
synchronized final void
synchronized Throwable
synchronized Throwable
String
String
StackTraceElement[]
synchronized final Throwable[]
synchronized Throwable
void
void
setStackTrace(StackTraceElement[] stackTrace)
String

Public fields

sniffFailures

public final ImmutableList<SniffFailuresniffFailures

Sniff failures from getSniffFailureDetails from any extractors that were checked while trying to recognize the input data.

May be empty if no extractors provided additional sniffing failure details.

uri

public final Uri uri

The Uri from which the unrecognized data was read.

Public constructors

UnrecognizedInputFormatException

@InlineMe(replacement = "this(message, uri, ImmutableList.of())", imports = "com.google.common.collect.ImmutableList")
public UnrecognizedInputFormatException(String message, Uri uri)

UnrecognizedInputFormatException

public UnrecognizedInputFormatException(
    String message,
    Uri uri,
    List<SniffFailure> sniffFailures
)

Constructs a new instance.

Parameters
String message

The detail message for the exception.

Uri uri

The Uri from which the unrecognized data was read.

List<SniffFailure> sniffFailures

Sniff failures from any extractors that were used to sniff the data while trying to recognize it.