blob: da40e9c410684b32170f121e34333ccd8b577690 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package android.util;
import java.util.Arrays;
public class Base64 {
/**
* Base64-encode the given data and return a newly allocated
* String with the result.
*
* @param input the data to encode
* @param flags controls certain features of the encoded output.
* Passing {@code DEFAULT} results in output that
* adheres to RFC 2045.
*/
public static String encodeToString(byte[] input, int flags) {
return Arrays.toString(java.util.Base64.getEncoder().encode(input));
}
}
|