public class FileUtil extends Object
该工具是一个线程安全类的工具
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static File |
base64ToFile(String base64File)
将base64字符串转换成文件
|
static String |
file2Base64(File file)
将文件转换成base64字符串
|
static String |
getMd5(File file)
计算一个文件的MD5值
|
public static File base64ToFile(String base64File) throws CustomException
base64File
- base64格式的文件CustomException
- 转换出错public static String file2Base64(File file) throws CustomException
file
- 待转换的文件CustomException
- 转换出错Copyright © 2021. All rights reserved.