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