public final class UrlTemplate extends Object
URLs are built according to the substitution rules defined in ISO/IEC 23009-1:2014 5.3.9.4.4.
Modifier and Type | Method and Description |
---|---|
String |
buildUri(String representationId,
int segmentNumber,
int bandwidth,
long time)
Constructs a Uri from the template, substituting in the provided arguments.
|
static UrlTemplate |
compile(String template)
Compile an instance from the provided template string.
|
public static UrlTemplate compile(String template)
template
- The template.IllegalArgumentException
- If the template string is malformed.public String buildUri(String representationId, int segmentNumber, int bandwidth, long time)
Arguments whose corresponding identifiers are not present in the template will be ignored.
representationId
- The representation identifier.segmentNumber
- The segment number.bandwidth
- The bandwidth.time
- The time as specified by the segment timeline.