Android Utililty Methods Base64 Byte Array Decode

List of utility methods to do Base64 Byte Array Decode

Description

The list of methods to do Base64 Byte Array Decode are organized into topic(s).

Method

Stringdecode(final byte[] data)
decode
return new String(Base64.decode(data, Base64.DEFAULT));
byte[]decode(byte[] arr)
Decodes a BASE64 encoded byte array.
int length = arr.length;
if (length == 0) {
    return new byte[0];
int sndx = 0, endx = length - 1;
int pad = arr[endx] == '=' ? (arr[endx - 1] == '=' ? 2 : 1) : 0;
int cnt = endx - sndx + 1;
int sepCnt = length > 76 ? (arr[76] == '\r' ? cnt / 78 : 0) << 1
...
voiddecode(char[] chars, OutputStream out)
Decode base64 encoded data.
decode(chars, 0, chars.length, out);
voiddecode(char[] chars, int off, int len, OutputStream out)
Decode base64 encoded data.
if (len == 0) {
    return;
if (len < 0 || off >= chars.length || len + off > chars.length) {
    throw new IllegalArgumentException();
char[] chunk = new char[4];
byte[] dec = new byte[3];
...