public byte[] decode(final String base64) {
        if (null == base64) {
            return null;
        }

        try {

            // getMimeDecoder is used instead of getDecoder as it better matches the
            // functionality of the default Commons Codec implementation (primarily more forgiving of strictly
            // invalid inputs to decode)
            // Code using java.util.Base64 directly should make a choice based on whether this forgiving nature is
            // appropriate.

            return getMimeDecoder().decode(base64);
        } catch (final IllegalArgumentException e) {
            return EMPTY_BYTES;
        }
    }
Decode a Base64 String to its original form, using specifications from this codec instance
httpclient5/src/main/java/org/apache/hc/client5/http/utils/Base64.java