Package oracle.i18n.net
Class URLDecoder
- java.lang.Object
-
- oracle.i18n.net.URLDecoder
-
public class URLDecoder extends Object
TheURLDecoder
contains a utility method for converting from a MIME format calledx-www-form-urlencoded
to aString
object.To convert to a
String
, each character is examined in turn:-
The ASCII characters '
a
' through 'z
', 'A
' through 'Z
', and '0
' through '9
' remain the same. -
The plus sign '
+
' is converted into a space character ' -
The remaining characters are represented by 3-character strings which
begin with the percent sign, "
%xy
", where xy is the two-digit hexadecimal representation of the lower 8-bits of the character.
- Since:
- 10.1.0.2
-
The ASCII characters '
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
decode(String s)
Decodes ax-www-form-urlencoded
object to aString
object using UTF-8 character set encoding.static String
decode(String s, String enc)
Decodes ax-www-form-urlencoded
object to aString
object.
-
-
-
Method Detail
-
decode
public static String decode(String s)
Decodes ax-www-form-urlencoded
object to aString
object using UTF-8 character set encoding.- Parameters:
s
-String
object to be decoded- Returns:
- the translated
String
object
-
decode
public static String decode(String s, String enc) throws UnsupportedEncodingException
Decodes ax-www-form-urlencoded
object to aString
object.Currently, AL16UTF16 (also known as UTF-16BE) is not supported.
- Parameters:
s
-String
object to be decodedenc
- the name of Oracle or IANA character set- Returns:
- the translated
String
object - Throws:
UnsupportedEncodingException
- if the character is not supportedNumberFormatException
- if invalid escape representation is detected
-
-