前言
图片如何转换为Base64?...很多网上教程,使用StringUtil这类过时的Java包,或者使用Oracle的sun包(如:sun.misc.BASE64Decoder、sun.misc.BASE64Encoder。...encode:传入字符数组【byte[]】,返回Base64字符串【String】
decode:传入Base64字符串【String】,返回字符数组【byte[]】
public class Base64Util...', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g'...图片转Base64
public static String encodeImgageToBase64(File imageFile) {
// 将图片文件转化为字节数组字符串,并对其进行