package com.biubiu.utils;
import Java . io .FileOutputStream;
import java.io.OutputStream;
import java.util.Base64;
public class Utils {
/**
* base64转化成图片文件
* @param base64
* @param imgFilePath
* @return
*/ public static boolean generateImage(String base64, String imgFilePath) {// 对字节数组 字符串 进行Base64解码并生成图片
if (base64 == null) // 图像数据为空
return false;
try {
// Base64解码
byte[] bytes = Base64.getDecoder().decode(base64);
for (int i = 0; i < bytes.length; ++i) {
if (bytes[i] < 0) {// 调整异常数据
bytes[i] += 256;
}
}
// 生成 jpeg 图片
OutputStream out = new FileOutputStream(imgFilePath);
out.write(bytes);
out.flush();
out. close ();
return true;
} catch (Exception e) {
return false;
}
}
}
Monitor Closely 1 indomethacin will increase the level or effect of probenecid by acidic anionic drug competition for renal tubular clearance
I ve used soap to calm some of the most vicious and painful leg cramps one could ever suffer