mirror of
https://gitee.com/jzsw-it/yexuejc-base.git
synced 2025-06-09 07:17:23 +08:00
更新代码
This commit is contained in:
parent
be42378156
commit
30ce976b27
@ -323,6 +323,33 @@ public class ImgUtil {
|
|||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* base64转文件
|
||||||
|
*
|
||||||
|
* @param decode baseByte
|
||||||
|
* @param fileName 文件名称(包含路径)
|
||||||
|
* @return 返回保存地址
|
||||||
|
*/
|
||||||
|
public static String base64ToFile(byte[] decode, String fileName) {
|
||||||
|
|
||||||
|
FileOutputStream out = null;
|
||||||
|
try {
|
||||||
|
out = new FileOutputStream(fileName);
|
||||||
|
out.write(decode);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
ioe.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (out != null) {
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
public static class ImageInfo {
|
public static class ImageInfo {
|
||||||
/**
|
/**
|
||||||
* 图片大小
|
* 图片大小
|
||||||
|
Loading…
x
Reference in New Issue
Block a user