# FilteringManifestParser

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/offline/FilteringManifestParser.java+class:androidx.media3.exoplayer.offline.FilteringManifestParser)

*** ** * ** ***


```
@UnstableApi
class FilteringManifestParser<T : FilterableManifest<T!>?> : ParsingLoadable.Parser<T!>
```

<br />

*** ** * ** ***

A manifest parser that includes only the streams identified by the given stream keys.

| Parameters |
|---|---|
| `<T : https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/FilterableManifest<T!>?>` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/FilterableManifest` type. |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/FilteringManifestParser#FilteringManifestParser(androidx.media3.exoplayer.upstream.ParsingLoadable.Parser<? extends T>,java.util.List<androidx.media3.common.StreamKey>)( parser: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/ParsingLoadable.Parser<T!>!, streamKeys: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/StreamKey!>? )` |

| ### Public functions |
|---|---|
| `T!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/offline/FilteringManifestParser#parse(android.net.Uri,java.io.InputStream)(uri: https://developer.android.com/reference/android/net/Uri.html!, inputStream: https://developer.android.com/reference/java/io/InputStream.html!)` Parses an object from a response. |

## Public constructors

### FilteringManifestParser

```
FilteringManifestParser(
    parser: ParsingLoadable.Parser<T!>!,
    streamKeys: (Mutable)List<StreamKey!>?
)
```

| Parameters |
|---|---|
| `parser: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/ParsingLoadable.Parser<T!>!` | A parser for the manifest that will be filtered. |
| `streamKeys: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/StreamKey!>?` | The stream keys. If null or empty then filtering will not occur. |

## Public functions

### parse

```
fun parse(uri: Uri!, inputStream: InputStream!): T!
```

Parses an object from a response.

| Parameters |
|---|---|
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | The source `https://developer.android.com/reference/android/net/Uri.html` of the response, after any redirection. |
| `inputStream: https://developer.android.com/reference/java/io/InputStream.html!` | An `https://developer.android.com/reference/java/io/InputStream.html` from which the response data can be read. |

| Returns |
|---|---|
| `T!` | The parsed object. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | If an error occurs parsing the data. |
| `https://developer.android.com/reference/java/io/IOException.html` | If an error occurs reading data from the stream. |