Here you can find the source of base64ToImg(String base64Strings)
public static BufferedImage base64ToImg(String base64Strings)
//package com.java2s; //License from project: Open Source License import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import javax.imageio.ImageIO; import sun.misc.BASE64Decoder; public class Main { public static BufferedImage base64ToImg(String base64Strings) { BufferedImage bi = null;//from w w w . j ava 2s .c o m ByteArrayInputStream bais = null; BASE64Decoder decoder = new sun.misc.BASE64Decoder(); byte[] bytes1; try { bytes1 = decoder.decodeBuffer(base64Strings); bais = new ByteArrayInputStream(bytes1); bi = ImageIO.read(bais); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return bi; } }