Class URIDecoder
java.lang.Object
org.jboss.resteasy.reactive.common.util.URIDecoder
- Author:
- Paulo Lopes
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Decodes a segment of an URI encoded by a browser.static String
decodeURIComponent
(String s, boolean plus) Decodes a segment of an URI encoded by a browser.
-
Method Details
-
decodeURIComponent
Decodes a segment of an URI encoded by a browser. The string is expected to be encoded as per RFC 3986, Section 2. This is the encoding used by JavaScript functions encodeURI and encodeURIComponent, but not escape. For example in this encoding, é (in Unicode U+00E9 or in UTF-8 0xC3 0xA9) is encoded as %C3%A9 or %c3%a9. Plus signs '+' will be handled as spaces and encoded using the default JDK URLEncoder class.- Parameters:
s
- string to decode- Returns:
- decoded string
-
decodeURIComponent
Decodes a segment of an URI encoded by a browser. The string is expected to be encoded as per RFC 3986, Section 2. This is the encoding used by JavaScript functions encodeURI and encodeURIComponent, but not escape. For example in this encoding, é (in Unicode U+00E9 or in UTF-8 0xC3 0xA9) is encoded as %C3%A9 or %c3%a9.- Parameters:
s
- string to decodeplus
- weather or not to transform plus signs into spaces- Returns:
- decoded string
-