Package software.amazon.awssdk.crt.utils
Class StringUtils
java.lang.Object
software.amazon.awssdk.crt.utils.StringUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
base64Decode
(byte[] data) Decode a Base64 byte array into a non-Base64 byte array.static byte[]
base64Encode
(byte[] data) Encode a byte array into a Base64 byte array.static String
join
(CharSequence delimiter, Iterable<? extends CharSequence> elements) Returns a new String composed of copies of the CharSequence elements joined together with a copy of the specified delimiter.
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
join
Returns a new String composed of copies of the CharSequence elements joined together with a copy of the specified delimiter. Like `Strings.join()` but works on Android before API 26.- Parameters:
delimiter
- a sequence of characters that is used to separate each of the elements in the resulting Stringelements
- an Iterable that will have its elements joined together- Returns:
- a new String that is composed from the elements argument
-
base64Encode
public static byte[] base64Encode(byte[] data) Encode a byte array into a Base64 byte array.- Parameters:
data
- The byte array to encode- Returns:
- The byte array encoded as Byte64
-
base64Decode
public static byte[] base64Decode(byte[] data) Decode a Base64 byte array into a non-Base64 byte array.- Parameters:
data
- The byte array to decode.- Returns:
- Byte array decoded from Base64.
-