Here you can find the source of createImage(byte[] data)
public static Image createImage(byte[] data)
//package com.java2s; //License from project: LGPL import java.awt.Image; import javax.swing.ImageIcon; public class Main { public static Image createImage(byte[] data) { return new ImageIcon(data).getImage(); }//ww w. jav a2 s . c o m }