# UnrecognizedInputFormatException

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/source/UnrecognizedInputFormatException.java+class:androidx.media3.exoplayer.source.UnrecognizedInputFormatException)

*** ** * ** ***


```
@UnstableApi
public class UnrecognizedInputFormatException extends ParserException
```

<br />

|---|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||||
|   |   | ↳ | [java.io.IOException](https://developer.android.com/reference/java/io/IOException.html) |||
|   |   |   | ↳ | [androidx.media3.common.ParserException](https://developer.android.com/reference/androidx/media3/common/ParserException) ||
|   |   |   |   | ↳ | [androidx.media3.exoplayer.source.UnrecognizedInputFormatException](https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException) |

*** ** * ** ***

Thrown if the input format was not recognized.

## Summary

| ### Public fields |
|---|---|
| `final https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/androidx/media3/extractor/SniffFailure>` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#sniffFailures()` Sniff failures from `https://developer.android.com/reference/androidx/media3/extractor/Extractor#getSniffFailureDetails()` from any extractors that were checked while trying to recognize the input data. |
| `final https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#uri()` The `https://developer.android.com/reference/android/net/Uri.html` from which the unrecognized data was read. |

| ### Public constructors |
|---|
| `@https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "this(message, uri, ImmutableList.of())", imports = "com.google.common.collect.ImmutableList") [UnrecognizedInputFormatException](https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#UnrecognizedInputFormatException(java.lang.String,android.net.Uri))(https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/android/net/Uri.html uri)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#UnrecognizedInputFormatException(java.lang.String,android.net.Uri,java.util.List<? extends androidx.media3.extractor.SniffFailure>)` instead. <br /> |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#UnrecognizedInputFormatException(java.lang.String,android.net.Uri,java.util.List<? extends androidx.media3.extractor.SniffFailure>)( https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/extractor/SniffFailure> sniffFailures )` Constructs a new instance. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#getMessage()()` |

### Inherited fields

From [androidx.media3.common.ParserException](https://developer.android.com/reference/androidx/media3/common/ParserException) `final boolean` `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()`

Whether the parsing error was caused by a bitstream not following the expected format.
`final int` `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()`

The `https://developer.android.com/reference/androidx/media3/common/C.DataType` of the parsed bitstream.

### Inherited methods

From [androidx.media3.common.ParserException](https://developer.android.com/reference/androidx/media3/common/ParserException) `static https://developer.android.com/reference/androidx/media3/common/ParserException` `https://developer.android.com/reference/androidx/media3/common/ParserException#createForMalformedContainer(java.lang.String,java.lang.Throwable)(
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html message,
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Throwable.html cause
)`

Creates a new instance for which `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()` is true and `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()` is `https://developer.android.com/reference/androidx/media3/common/C#DATA_TYPE_MEDIA()`.
`static https://developer.android.com/reference/androidx/media3/common/ParserException` `https://developer.android.com/reference/androidx/media3/common/ParserException#createForMalformedDataOfUnknownType(java.lang.String,java.lang.Throwable)(
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html message,
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Throwable.html cause
)`

Creates a new instance for which `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()` is true and `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()` is `https://developer.android.com/reference/androidx/media3/common/C#DATA_TYPE_UNKNOWN()`.
`static https://developer.android.com/reference/androidx/media3/common/ParserException` `https://developer.android.com/reference/androidx/media3/common/ParserException#createForMalformedManifest(java.lang.String,java.lang.Throwable)(
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html message,
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Throwable.html cause
)`

Creates a new instance for which `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()` is true and `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()` is `https://developer.android.com/reference/androidx/media3/common/C#DATA_TYPE_MANIFEST()`.
`static https://developer.android.com/reference/androidx/media3/common/ParserException` `https://developer.android.com/reference/androidx/media3/common/ParserException#createForMalformedSteeringManifest(java.lang.String,java.lang.Throwable)(
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html message,
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Throwable.html cause
)`

Creates a new instance for which `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()` is true and `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()` is `https://developer.android.com/reference/androidx/media3/common/C#DATA_TYPE_STEERING_MANIFEST()`.
`static https://developer.android.com/reference/androidx/media3/common/ParserException` `https://developer.android.com/reference/androidx/media3/common/ParserException#createForManifestWithUnsupportedFeature(java.lang.String,java.lang.Throwable)(
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html message,
@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Throwable.html cause
)`

Creates a new instance for which `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()` is false and `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()` is `https://developer.android.com/reference/androidx/media3/common/C#DATA_TYPE_MANIFEST()`.
`static https://developer.android.com/reference/androidx/media3/common/ParserException` `https://developer.android.com/reference/androidx/media3/common/ParserException#createForUnsupportedContainerFeature(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html message)`

Creates a new instance for which `https://developer.android.com/reference/androidx/media3/common/ParserException#contentIsMalformed()` is false and `https://developer.android.com/reference/androidx/media3/common/ParserException#dataType()` is `https://developer.android.com/reference/androidx/media3/common/C#DATA_TYPE_MEDIA()`.
From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html exception)` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `StackTraceElement[]` `https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `synchronized final Throwable[]` `https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(StackTraceElement[] stackTrace)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`

## Public fields

### sniffFailures

```
public final ImmutableList<SniffFailure> sniffFailures
```

Sniff failures from `https://developer.android.com/reference/androidx/media3/extractor/Extractor#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 `https://developer.android.com/reference/android/net/Uri.html` 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](https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#UnrecognizedInputFormatException(java.lang.String,android.net.Uri))(String message, Uri uri)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/exoplayer/source/UnrecognizedInputFormatException#UnrecognizedInputFormatException(java.lang.String,android.net.Uri,java.util.List<? extends androidx.media3.extractor.SniffFailure>)` instead.

### UnrecognizedInputFormatException

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

Constructs a new instance.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html message` | The detail message for the exception. |
| `https://developer.android.com/reference/android/net/Uri.html uri` | The `https://developer.android.com/reference/android/net/Uri.html` from which the unrecognized data was read. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/extractor/SniffFailure> sniffFailures` | Sniff failures from any extractors that were used to sniff the data while trying to recognize it. |

## Public methods

### getMessage

```
public String getMessage()
```