Class FilteringManifestParser<T extends FilterableManifest<T>>
- java.lang.Object
-
- com.google.android.exoplayer2.offline.FilteringManifestParser<T>
-
- Type Parameters:
T
- TheFilterableManifest
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.
-
-
-
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 interfaceParsingLoadable.Parser<T extends FilterableManifest<T>>
- Parameters:
uri
- The sourceUri
of the response, after any redirection.inputStream
- AnInputStream
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.
-
-