Java Base64 Decode base64Decode(String data)

Here you can find the source of base64Decode(String data)

Description

Decodes the specified String into a byte array assuming that the string is Base64 encoded.

License

Open Source License

Parameter

Parameter Description
data to decode

Return

decoded byte

Declaration

public static byte[] base64Decode(String data) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Base64;

public class Main {
    /**//from  w  w  w .  j  av  a2s.c  om
     * Decodes the specified String into a byte array assuming that the string is Base64 encoded.
     *
     * @param data to decode
     * @return decoded byte
     */
    public static byte[] base64Decode(String data) {
        byte[] d = Base64.getDecoder().decode(data.getBytes());
        return d;
    }
}

Related

  1. base64Decode(final String data)
  2. base64Decode(final String s)
  3. base64Decode(String _s, String _enc)
  4. base64Decode(String b64)
  5. base64Decode(String base64Str)
  6. base64Decode(String input)
  7. base64Decode(String s)
  8. base64Decode(String s)
  9. base64Decode(String s)