Java XML Base64 Encode Decode decodeBase64(String base64)

Here you can find the source of decodeBase64(String base64)

Description

decode Base

License

Open Source License

Declaration

public static byte[] decodeBase64(String base64) 

Method Source Code

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

import javax.xml.bind.DatatypeConverter;

public class Main {
    public static byte[] decodeBase64(String base64) {
        if (base64 == null || base64.equals("")) {
            return null;
        }/*from   w  w w.  j  a v a  2  s. co  m*/
        try {
            return DatatypeConverter.parseBase64Binary(base64);
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. compressToBase64(byte[] message)
  2. createBase64EncodedStringFromURL(URL url)
  3. decode(String base64)
  4. decodeBase64(File file)
  5. decodeBase64(String b64data)
  6. decodeBase64(String s)
  7. decodeBase64(String value)
  8. decompressFromBase64(String message)
  9. encodeBase64(byte[] b)