public final class URITemplate extends Object
URITemplateParser| Constructor and Description |
|---|
URITemplate(String input)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
toString(VariableMap vars)
Expand this template to a string given a list of variables
|
URI |
toURI(VariableMap vars)
Expand this template to a URI given a set of variables
|
URL |
toURL(VariableMap vars)
Expand this template to a URL given a set of variables
|
public URITemplate(String input) throws URITemplateParseException
input - the input stringURITemplateParseException - parse errorpublic String toString(VariableMap vars) throws URITemplateException
vars - the variable map (names as keys, contents as values)URITemplateException - expansion error (f.e. modifier mismatch)public URI toURI(VariableMap vars) throws URITemplateException, URISyntaxException
vars - the variablesURITemplateException - see toString(VariableMap)URISyntaxException - expanded string is not a valid URIpublic URL toURL(VariableMap vars) throws URITemplateException, MalformedURLException
vars - the variablesURITemplateException - see toString(VariableMap)MalformedURLException - expanded string is not a valid URL