public class BuiltInUtils extends Object
Constructor and Description |
---|
BuiltInUtils() |
Modifier and Type | Method and Description |
---|---|
static BMap<String,BValue> |
createConversionError(Context context,
String msg) |
static void |
decode(Context context,
BValue encodedInput,
String charset,
boolean isMimeSpecific)
Decode a given BValue using Base64 encoding scheme.
|
static void |
decodeString(Context context,
String stringToBeDecoded,
String charset,
boolean isMimeSpecific)
Decode a given encoded string using Base64 encoding scheme.
|
static void |
encode(Context context,
BValue input,
String charset,
boolean isMimeSpecific)
Encode a given BValue using Base64 encoding scheme.
|
static void |
encodeString(Context context,
String stringToBeEncoded,
String charset,
boolean isMimeSpecific)
Encode a given string using Base64 encoding scheme.
|
static BValue |
getSystemProperty(String key)
Returns the system property which corresponds to the given key.
|
public static BValue getSystemProperty(String key)
key
- system property keyBValue
or BTypes.typeString.getZeroValue()
if the property does not
exist.public static BMap<String,BValue> createConversionError(Context context, String msg)
public static void encode(Context context, BValue input, String charset, boolean isMimeSpecific)
context
- Represent a ballerina contextinput
- Represent a BValue which can be of type blob, string or byte channelcharset
- Represent the charset value to be used with stringisMimeSpecific
- A boolean indicating whether the encoder should be mime specific or notpublic static void decode(Context context, BValue encodedInput, String charset, boolean isMimeSpecific)
context
- Represent a ballerina contextencodedInput
- Represent an encoded BValue which can be of type blob, string or byte channelcharset
- Represent the charset value to be used with stringisMimeSpecific
- A boolean indicating whether the decoder should be mime specific or notpublic static void encodeString(Context context, String stringToBeEncoded, String charset, boolean isMimeSpecific)
context
- Represent a ballerina contextstringToBeEncoded
- Represent the string that needs to be encodedcharset
- Represent the charset value to be used with stringisMimeSpecific
- A boolean indicating whether the encoder should be mime specific or notpublic static void decodeString(Context context, String stringToBeDecoded, String charset, boolean isMimeSpecific)
context
- Represent a ballerina contextstringToBeDecoded
- Represent the string that needs to be decodedcharset
- Represent the charset value to be used with stringisMimeSpecific
- A boolean indicating whether the decoder should be mime specific or notCopyright © 2018 WSO2. All rights reserved.