public static BufferedImage byteArrayToBufferedImage(byte[] image) {
	BufferedImage bufferedImage = null;
	InputStream in = new ByteArrayInputStream(image);
	try {
	    bufferedImage = ImageIO.read(in);
	} catch (IOException ex) {
	    Logger.getLogger(ImageUtils.class.getName()).log(Level.SEVERE, null, ex);
	}
	return bufferedImage;
    }