Here you can find the source of toBytesFromBase64(String inBase64String)
public static byte[] toBytesFromBase64(String inBase64String)
//package com.java2s; //License from project: Open Source License import java.util.Base64; public class Main { public static final byte[] EMPTY_BYTES = new byte[0]; public static byte[] toBytesFromBase64(String inBase64String) { if (inBase64String == null) { return null; }/*from w w w . j a v a 2s .c o m*/ if (inBase64String.trim().isEmpty()) { return EMPTY_BYTES; } return Base64.getDecoder().decode(inBase64String); } }