Android Base64 Encode ImageBase64Decode(String base64_str)

Here you can find the source of ImageBase64Decode(String base64_str)

Description

Image Base64 Decode

Parameter

Parameter Description
base64_str a parameter

Declaration

public static byte[] ImageBase64Decode(String base64_str) 

Method Source Code

//package com.java2s;

import android.util.Base64;

public class Main {
    /**/*www  .  java2  s .  com*/
     * Image Base64 Decode
     * @param base64_str
     * @return
     */
    public static byte[] ImageBase64Decode(String base64_str) {
        byte[] b = Base64.decode(base64_str, Base64.DEFAULT);
        for (int i = 0; i < b.length; i++) {
            if (b[i] < 0) {
                b[i] += 256;
            }
        }
        return b;
    }
}

Related

  1. toBase64(byte[] barray)
  2. encodeBase64(byte abyte0[])
  3. encodeBase64(String input)
  4. encryptToBase64Text(String key, String src)
  5. generateBase64String(String inString)
  6. longKeyId2Base64String(long keyId)
  7. convertToBase64(byte[] in)
  8. base64StringKeyId2Long(String keyId)