public class Base64ImageUtil extends Object
| 构造器和说明 |
|---|
Base64ImageUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
base64ToByteArray(String base64)
base64字符串转换字节数组
|
static boolean |
base64ToImgFile(String base64,
String imgFilePath)
base64字符串转换图片文件
|
static InputStream |
base64ToInputStream(String base64)
base64字符串转换输入流
|
static String |
getBase64ImgSuffix(String base64Img)
获取base64的图片后缀
|
static String |
localImgToBase64(String imgFile)
本地图片转换base64字符串
|
static String |
remoteImgToBase64(String imgURL)
在线图片转换base64字符串
|
static byte[] |
remoteImgToByteArray(String imgURL)
在线图片转换字节数组
|
public static String localImgToBase64(String imgFile)
imgFile - public static byte[] remoteImgToByteArray(String imgURL)
imgURL - public static String remoteImgToBase64(String imgURL)
imgURL - public static byte[] base64ToByteArray(String base64)
base64 - IOExceptionpublic static InputStream base64ToInputStream(String base64)
base64 - IOExceptionpublic static boolean base64ToImgFile(String base64, String imgFilePath) throws IOException
base64 - imgFilePath - IOExceptionCopyright © 2020. All rights reserved.