public class TTMLParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TTMLParser.Attributes
All XML attributes recognized in a TTML document.
|
static class |
TTMLParser.Namespaces
Namespaces specified by TTML specification.
|
static class |
TTMLParser.Tags
All tags recognized in a TTML document.
|
Modifier and Type | Method and Description |
---|---|
static int |
parseTimeValue(java.lang.String value)
Parses a string representing a time code position within a video following the format:
HH:MM:ss.mmm or HH:MM:ss:mm
Where the following values are expected:
HH - a 2 digit hours value, zero padded
MM - a 2 digit minutes value, zero padded
ss - a 2 digit seconds value, zero padded
mmm - a 2 or 3 digit milliseconds value, zero padded
The parsed value is converted to an integer representing the total number of milliseconds represented by this
time code expression, relative to the start of a video timeline.
|
static TTMLDocument |
parseXml(java.io.InputStream inputStream,
java.lang.String encoding)
Parses the given
InputStream using the specified encoding. |
static TTMLDocument |
parseXml(java.io.Reader reader)
Parses the given
Reader into a TTMLDocument . |
public static TTMLDocument parseXml(java.io.InputStream inputStream, java.lang.String encoding) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
InputStream
using the specified encoding.inputStream
- the stream containing the content to parseencoding
- the character encodingTTMLDocument
org.xmlpull.v1.XmlPullParserException
java.io.IOException
public static TTMLDocument parseXml(java.io.Reader reader) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
Reader
into a TTMLDocument
.reader
- the reader containing the content to parseTTMLDocument
org.xmlpull.v1.XmlPullParserException
java.io.IOException
public static int parseTimeValue(java.lang.String value)
value
- the time code expression to be parsed