public String buildUri(String representationId,int segmentNumber,int bandwidth,long time){
  StringBuilder builder=new StringBuilder();
  for (int i=0; i < identifierCount; i++) {
    builder.append(urlPieces[i]);
    if (identifiers[i] == REPRESENTATION_ID) {
      builder.append(representationId);
    }
 else     if (identifiers[i] == NUMBER_ID) {
      builder.append(String.format(Locale.US,identifierFormatTags[i],segmentNumber));
    }
 else     if (identifiers[i] == BANDWIDTH_ID) {
      builder.append(String.format(Locale.US,identifierFormatTags[i],bandwidth));
    }
 else     if (identifiers[i] == TIME_ID) {
      builder.append(String.format(Locale.US,identifierFormatTags[i],time));
    }
  }
  builder.append(urlPieces[identifierCount]);
  return builder.toString();
}

public String buildUri ( String representationId , int segmentNumber , int bandwidth , long time ) { StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < identifierCount ; i ++ ) { builder . append ( urlPieces [ i ] ) ; if ( identifiers [ i ] == REPRESENTATION_ID ) { builder . append ( representationId ) ; } else if ( identifiers [ i ] == NUMBER_ID ) { builder . append ( String . format ( Locale . US , identifierFormatTags [ i ] , segmentNumber ) ) ; } else if ( identifiers [ i ] == BANDWIDTH_ID ) { builder . append ( String . format ( Locale . US , identifierFormatTags [ i ] , bandwidth ) ) ; } else if ( identifiers [ i ] == TIME_ID ) { builder . append ( String . format ( Locale . US , identifierFormatTags [ i ] , time ) ) ; } } builder . append ( urlPieces [ identifierCount ] ) ; return builder . toString ( ) ; }
constructs a uri from the template , substituting in the provided arguments . < p > arguments whose corresponding identifiers are not present in the template will be ignored .
