com.sap.security.core.server.csi.util
Class URLEncoder
java.lang.Object
com.sap.security.core.server.csi.util.URLEncoder
public final class URLEncoder
- extends Object
A simple wrapper for the URLEncoder of JDK 1.4, which can be also
used on 6.30 platforms, where the build is done with JDK 1.3.
|
Method Summary |
static String |
encode(String s)
Deprecated. The resulting string may vary depending on the platform's
default encoding. Instead, use the encode(String,String)
method to specify the encoding. |
static String |
encode(String s,
String enc)
Translates a string into application/x-www-form-urlencoded
format using a specific encoding scheme. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URLEncoder
public URLEncoder()
encode
public static String encode(String s)
- Deprecated. The resulting string may vary depending on the platform's
default encoding. Instead, use the encode(String,String)
method to specify the encoding.
- Translates a string into
x-www-form-urlencoded
format. This method uses the platform's default encoding
as the encoding scheme to obtain the bytes for unsafe characters.
- Parameters:
s - String to be translated.
- Returns:
- the translated
String.
encode
public static String encode(String s,
String enc)
throws UnsupportedEncodingException
- Translates a string into
application/x-www-form-urlencoded
format using a specific encoding scheme. This method uses the
supplied encoding scheme to obtain the bytes for unsafe
characters.
Note: The
World Wide Web Consortium Recommendation states that
UTF-8 should be used. Not doing so may introduce
incompatibilites.
- Parameters:
s - String to be translated.enc - The name of a supported
character
encoding.
- Returns:
- the translated
String.
- Throws:
UnsupportedEncodingException - If the named encoding is not supported- Since:
- 1.4
This class can be accessed from:
|
SC
|
DC
|
[sap.com] ENGINEAPI
|
[sap.com] security.class
|
[sap.com] ENGFACADE
|
[sap.com] tc/bl/security/lib
|
Copyright 2010 SAP AG Complete Copyright Notice