public final class VariableEncoder
extends java.lang.Object
URI or add
variables to it to send them back to the
DocumentServer.
Variables are appended to the given URI like the query string in a
URL.
DocumentServer,
URL.getQuery()| Constructor and Description |
|---|
VariableEncoder(java.net.URI uri)
Construct a new object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String name,
java.lang.String value)
Adds a variable with the given name and value.
|
java.net.URI |
getBaseUri()
Get the base URI without any parameters.
|
java.util.Map<java.lang.String,java.lang.String> |
getVariables()
Gets the currently defined variables and their values.
|
java.net.URI |
toUri()
Gets an encoded URI, consisting of the base URI, and assigned variables.
|
public VariableEncoder(java.net.URI uri)
uri - The base URI for encoding/decoding variables.public java.util.Map<java.lang.String,java.lang.String> getVariables()
public void add(java.lang.String name,
java.lang.String value)
name - Name of the new variable.value - Value of the variable.public java.net.URI toUri()
getBaseUri() to retrieve the URI without any
variables.getBaseUri()public java.net.URI getBaseUri()
toUri() to
retrieve the URI with assigned variables.toUri()