public static boolean isImage( final byte[] bytes )
    {
        if ( bytes == null )
        {
            throw new IllegalArgumentException( "Argument 'bytes' cannot be null." );
        }
        return isImage( new ByteArrayInputStream( bytes ) );
    }
Checks if the provided byte array represents an image.

@param bytes The data to be parsed. Cannot be null.
@return true if the provided data is successfully identified as an image, otherwise false.
xmppserver/src/main/java/org/jivesoftware/util/GraphicsUtils.java