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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert the given URI into its string format.static StringRemove any "state=" parameter from the given URI.static URIremoveStateParameter(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:
unmarshalin classjavax.xml.bind.annotation.adapters.XmlAdapter<String,URI> - Parameters:
v- The string to convert.- Returns:
- A
URIobject for the string, or null ifvis 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
uriwithout the state information.
-
removeStateParameter
Remove any "state=" parameter from the given URI.- Parameters:
uri- The URI to modify.- Returns:
- A string which is
uriwithout the state information.
-