Convert to and from URI objects, correctly encoding the query string.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
URIAdapter
public URIAdapter()
-
-
Method Details
-
unmarshal
Convert a string into a URI.- Specified by:
unmarshal
in classXmlAdapter<String,
URI> - Parameters:
v
- The string to convert.- Returns:
- A
URI
object for the string, or null ifv
is null. - Throws:
URISyntaxException
- if the string cannot be parsed.
-
marshal
Convert the given URI into its string format.- Specified by:
marshal
in classXmlAdapter<String,
URI> - Parameters:
v
- The URI to print.- Returns:
- The URI as a string, or null if
v
is null. - Throws:
URISyntaxException
- if the URI cannot be parsed.
-