public final class TtmlParser extends Object implements SubtitleParser
Supported features in this parser are:
| Constructor and Description |
|---|
TtmlParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canParse(String mimeType)
Checks whether the parser supports a given subtitle mime type.
|
TtmlSubtitle |
parse(byte[] bytes,
int offset,
int length)
Parses a
Subtitle from the provided byte[]. |
public boolean canParse(String mimeType)
SubtitleParsercanParse in interface SubtitleParsermimeType - A subtitle mime type.public TtmlSubtitle parse(byte[] bytes, int offset, int length) throws ParserException
SubtitleParserSubtitle from the provided byte[].parse in interface SubtitleParserbytes - The array holding the subtitle data.offset - The offset of the subtitle data in bytes.length - The length of the subtitle data in bytes.ParserException - If a problem occurred parsing the subtitle data.