|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sap.netweaver.bc.rf.common.UriCodec
Utility class for decoding/encoding URIs in HTTP requests. Handles escaping of reserved as well as non-7bit characters.
Instances of this class are not threadsafe. The class methods are threadsafe, however.
Copyright (c) SAP AG 2001-2003
| Constructor Summary | |
UriCodec()
Creates a new URICoded Instance. |
|
| Method Summary | |
java.lang.String |
decode(java.lang.String quoted)
Converts an encoded URI into a Java String. |
static java.lang.String |
Decode(java.lang.String quotedURI)
Decode the given URI. |
static java.util.Properties |
DecodeQuery(java.lang.String query)
Decode the given http query string. |
java.lang.String |
encode(java.lang.String unquoted)
Converts a URI in plain Java String to a format suitable for transmitting in Http requests. |
static java.lang.String |
Encode(java.lang.String unquotedURI)
Encode the given URI. |
java.lang.String |
encodePath(java.lang.String unquoted)
Converts a URI in plain Java String to a format suitable for transmitting in Http requests. |
static java.lang.String |
EncodePath(java.lang.String path)
Encode the given http path string. |
static java.lang.String |
EncodeQuery(java.util.Properties params)
Encode the given http query string. |
static java.lang.String |
getURIEncoding(byte b)
Get string with URI escapes for given byte. |
static int |
getUTF8SequenceLength(byte b)
Return the sequence length of a UTF-8 sequence starting with the given byte. |
static boolean |
looksLikeUTF8(byte[] bytes)
Determines if bytes are a valid UTF-8 sequence. |
static java.lang.String |
RemoveParameter(java.lang.String query,
java.lang.String paramName)
Remove a parameter from a query string if present. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UriCodec()
| Method Detail |
public static java.lang.String Encode(java.lang.String unquotedURI)
unquotedURI - non-encoded URIpublic static java.lang.String Decode(java.lang.String quotedURI)
quotedURI - encoded URIpublic static java.lang.String EncodeQuery(java.util.Properties params)
params - parameter to encodepublic static java.lang.String EncodePath(java.lang.String path)
path - TBD: Description of the incoming method parameterpublic static java.util.Properties DecodeQuery(java.lang.String query)
query - http uri encoded
public static java.lang.String RemoveParameter(java.lang.String query,
java.lang.String paramName)
query - to remove parameter fromparamName - name of parameterpublic java.lang.String decode(java.lang.String quoted)
This method is not multithread-safe.
quoted - the quoted URIpublic java.lang.String encode(java.lang.String unquoted)
This method is not multithread-safe.
unquoted - URI in unquoted formpublic java.lang.String encodePath(java.lang.String unquoted)
This method is not multithread-safe.
unquoted - URI in unquoted formpublic static final boolean looksLikeUTF8(byte[] bytes)
bytes - TBD: Description of the incoming method parameterpublic static final int getUTF8SequenceLength(byte b)
b - byte for sequence startpublic static final java.lang.String getURIEncoding(byte b)
b - byte to escape
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||