Convert to and from URI objects, correctly encoding the query string.
Can also remove the "state" parameter from the query part of a URI string
before converting to a URI object, or when converting back.
Turns out this is probably a bad idea after all, so it has been disabled.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConvert the given URI into its string format.static String
Remove any "state=" parameter from the given URI.static URI
removeStateParameter
(URI uri) Remove any "state=" parameter from the given URI.Convert a string into a URI.
-
Constructor Details
-
URIAdapter
public URIAdapter()
-
-
Method Details
-
unmarshal
Convert a string into a URI.- Specified by:
unmarshal
in classjavax.xml.bind.annotation.adapters.XmlAdapter<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. -
removeStateParameter
Remove any "state=" parameter from the given URI.- Parameters:
uri
- The URI to modify.- Returns:
- A new URI which is
uri
without the state information.
-
removeStateParameter
Remove any "state=" parameter from the given URI.- Parameters:
uri
- The URI to modify.- Returns:
- A string which is
uri
without the state information.
-