Here you can find the source of decodeBase64AsUtf8(String data)
public static String decodeBase64AsUtf8(String data)
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import com.google.common.io.BaseEncoding; public class Main { public static final String UTF_8 = "UTF-8"; public static String decodeBase64AsUtf8(String data) { return encodeAsUtf8(decodeAsBase64(data)); }/*from ww w .j ava 2 s. c o m*/ public static String encodeAsUtf8(byte[] bytes) { try { return new String(bytes, UTF_8); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } public static byte[] decodeAsBase64(String data) { return BaseEncoding.base64().decode(data); } }