public static BufferedImage getImage(byte[] imageBytes) throws IOException {

		BufferedImage image = null;

		if (imageBytes != null) {
			ByteArrayInputStream stream = new ByteArrayInputStream(imageBytes);
			image = ImageIO.read(stream);
			stream.close();
		}

		return image;
	}
public static BufferedImage getImage ( byte [ ] imageBytes ) throws IOException { BufferedImage image = null ; if ( imageBytes != null ) { ByteArrayInputStream stream = new ByteArrayInputStream ( imageBytes ) ; image = ImageIO . read ( stream ) ; stream . close ( ) ; } return image ; }
Get a buffered image of the image bytes

@param imageBytes
image bytes
@return buffered image or null
@throws IOException
upon failure
@since 1.1.2