import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Base64;
public class Utils {
/**
* base64转化成 inputStream
*
* @param base64
* @return
*/
public static InputStream base64ToInputStream(String base64) {
ByteArrayInputStream stream = null;
try {
byte[] bytes = Base64.getDecoder().decode(base64);
stream = new ByteArrayInputStream(bytes);
} catch (Exception e) {
e.printStackTrace();
}
return stream;
}
}
File base64 转 inputStream
最新推荐文章于 2024-08-18 00:36:51 发布