标签:div put read tac static stat type write turn
/** * * @param BASE64str bas64字符串 * @param path 存储地址 * @return 存储地址 */ public static String BASE64CodeToBeImage(String BASE64str,String path){ BufferedImage image = null; byte[] imageByte = null; try { imageByte = DatatypeConverter.parseBase64Binary(BASE64str); ByteArrayInputStream bis = new ByteArrayInputStream(imageByte); image = ImageIO.read(new ByteArrayInputStream(imageByte)); bis.close(); File outputfile = new File(path); ImageIO.write(image, "jpg", outputfile); } catch (IOException e) { e.printStackTrace(); } return null; }
标签:div put read tac static stat type write turn
原文地址:https://www.cnblogs.com/ycq-qiang/p/14547784.html