Package com.google.android.exoplayer2.offline

## Class FilteringManifestParser<T extends FilterableManifest<T>>

- java.lang.Object
- - com.google.android.exoplayer2.offline.FilteringManifestParser<T>

- Type Parameters:
    `T` - The `FilterableManifest` type.
  All Implemented Interfaces:
    `ParsingLoadable.Parser<T>`

      public final class FilteringManifestParser<T extends FilterableManifest<T>>
      extends Object
      implements ParsingLoadable.Parser<T>

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

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FilteringManifestParser​(ParsingLoadable.Parser<? extends T> parser, List<StreamKey> streamKeys)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `parse​(Uri uri, InputStream inputStream)` | Parses an object from a response.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FilteringManifestParser

          public FilteringManifestParser​(ParsingLoadable.Parser<? extends T> parser,
                                         @Nullable
                                         List<StreamKey> streamKeys)

      Parameters:
        `parser` - A parser for the manifest that will be filtered.
        `streamKeys` - The stream keys. If null or empty then filtering will not occur.

  - ### Method Detail

    - #### parse

          public T parse​(Uri uri,
                         InputStream inputStream)
                  throws IOException

      Description copied from interface: `ParsingLoadable.Parser`
      Parses an object from a response.
      Specified by:
        `parse` in interface `ParsingLoadable.Parser<T extends FilterableManifest<T>>`
      Parameters:
        `uri` - The source `Uri` of the response, after any redirection.
        `inputStream` - An `InputStream` from which the response data can be read.
      Returns:
        The parsed object.
      Throws:
        `ParserException` - If an error occurs parsing the data.
        `IOException` - If an error occurs reading data from the stream.