public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASE64_DECODE_ERROR |
static String |
BASE64_ENCODE_ERROR |
static String |
PACKAGE_TIME |
static String |
PROTOCOL_PACKAGE_MIME |
static String |
PROTOCOL_PACKAGE_UTIL |
static int |
READABLE_BUFFER_SIZE |
static String |
STRUCT_TYPE_TIME |
static String |
STRUCT_TYPE_TIMEZONE |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static BStruct |
createConversionError(Context context,
String msg) |
static BStruct |
createTimeStruct(StructInfo timezoneStructInfo,
StructInfo timeStructInfo,
long millis,
String zoneIdName) |
static BStruct |
createTimeZone(StructInfo timezoneStructInfo,
String zoneIdValue) |
static void |
decode(Context context,
BValue encodedInput,
String charset,
boolean isMimeSpecific)
Decode a given BValue using Base64 encoding scheme.
|
static void |
encode(Context context,
BValue input,
String charset,
boolean isMimeSpecific)
Encode a given BValue using Base64 encoding scheme.
|
static StructInfo |
getTimeStructInfo(Context context) |
static StructInfo |
getTimeZoneStructInfo(Context context) |
public static final String PACKAGE_TIME
public static final String STRUCT_TYPE_TIME
public static final String STRUCT_TYPE_TIMEZONE
public static final int READABLE_BUFFER_SIZE
public static final String PROTOCOL_PACKAGE_UTIL
public static final String PROTOCOL_PACKAGE_MIME
public static final String BASE64_ENCODE_ERROR
public static final String BASE64_DECODE_ERROR
public static BStruct createTimeZone(StructInfo timezoneStructInfo, String zoneIdValue)
public static BStruct createTimeStruct(StructInfo timezoneStructInfo, StructInfo timeStructInfo, long millis, String zoneIdName)
public static StructInfo getTimeZoneStructInfo(Context context)
public static StructInfo getTimeStructInfo(Context context)
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 notCopyright © 2018 WSO2. All rights reserved.