java.net
public class URLEncoder extends Object
This method is very useful for encoding strings to be sent to CGI scripts
Method Summary | |
---|---|
static String | encode(String s)
This method translates the passed in string into x-www-form-urlencoded
format using the default encoding. |
static String | encode(String s, String encoding)
This method translates the passed in string into x-www-form-urlencoded
format using the character encoding to hex-encode the unsafe characters.
|
Deprecated:
This method translates the passed in string into x-www-form-urlencoded format using the default encoding. The standard encoding is "UTF-8", and the two-argument form of this method should be used instead.Parameters: s The String to convert
Returns: The converted String
Parameters: s The String to convert encoding The encoding to use for unsafe characters
Returns: The converted String
Throws: UnsupportedEncodingException If the named encoding is not supported
Since: 1.4