Here you can find the source of byteToBufferedImage(byte[] imgBytes)
public static BufferedImage byteToBufferedImage(byte[] imgBytes) throws IOException
//package com.java2s; //License from project: Open Source License import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.*; public class Main { public static BufferedImage byteToBufferedImage(byte[] imgBytes) throws IOException { InputStream in = new ByteArrayInputStream(imgBytes); BufferedImage bImageFromConvert = ImageIO.read(in); return bImageFromConvert; }//from w w w. jav a2s. com }