Here you can find the source of decodeBase64(String base64)
public static byte[] decodeBase64(String base64)
//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; } } }