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
encodeAuthComponent(ZosConnection connection)
Encodes the passed connection String as UTF-8 for usage of the AUTHORIZATION http header.static String
encodeURIComponent(String value)
Encodes the passed String as UTF-8 using an algorithm that's compatible with JavaScript's encodeURIComponent function.
-
-
-
Method Detail
-
encodeURIComponent
public static String encodeURIComponent(String value)
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:
value
- string to be encoded- Returns:
- encoded String or original string
-
encodeAuthComponent
public static String encodeAuthComponent(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
-
-