类 Base64Utils
java.lang.Object
icu.xuyijie.base64utils.Base64Utils
- 作者:
- 徐一杰
-
方法概要
修饰符和类型方法说明static StringgenerateFile(String base64Str, String filePath) 进行Base64解码并生成文件保存到指定路径 imgFilePath 待保存的本地路径static StringgenerateFile(String base64Str, String folderPath, String fileName) 进行Base64解码并生成文件保存到指定路径 imgFilePath 待保存的本地路径static StringtransferToBase64(File file) 将文件转换成 Base64 码static StringtransferToBase64(String filePath) 将文件转换成 Base64 码
-
方法详细资料
-
transferToBase64
将文件转换成 Base64 码- 参数:
filePath- 文件全路径- 返回:
- base64码
- 抛出:
IOException
-
transferToBase64
将文件转换成 Base64 码- 参数:
file- 文件对象- 返回:
- base64码
- 抛出:
IOException
-
generateFile
进行Base64解码并生成文件保存到指定路径 imgFilePath 待保存的本地路径- 参数:
base64Str- base64码folderPath- 要保存的文件位置(不含文件名)fileName- 文件名- 返回:
- 保存的文件全路径(含文件名)
-
generateFile
进行Base64解码并生成文件保存到指定路径 imgFilePath 待保存的本地路径- 参数:
base64Str- base64码filePath- 要保存的文件全路径(含文件名)- 返回:
- 保存的文件全路径(含文件名)
-