Package zowe.client.sdk.utility
Class EncodeUtils
- java.lang.Object
-
- zowe.client.sdk.utility.EncodeUtils
-
public final class EncodeUtils extends Object
Utility Class contains helper methods for encoding processing- Version:
- 2.0
- Author:
- Frank Giordano
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
encodeURIComponent(String str)
Encodes the passed String as UTF-8 using an algorithm that's compatible with JavaScript's encodeURIComponent function.static String
getAuthEncoding(ZosConnection connection)
Encodes the passed connection String as UTF-8 for usage of the AUTHORIZATION http header.
-
-
-
Method Detail
-
encodeURIComponent
public static String encodeURIComponent(String str)
Encodes the passed String as UTF-8 using an algorithm that's compatible with JavaScript's encodeURIComponent function. Returns incoming string un-encoded if exception occurs.- Parameters:
str
- string to be encoded- Returns:
- encoded String or original string
-
getAuthEncoding
public static String getAuthEncoding(ZosConnection connection)
Encodes the passed connection String as UTF-8 for usage of the AUTHORIZATION http header.- Parameters:
connection
- connection information, see ZosConnection object- Returns:
- encoded String
-
-