Recurity.Swf.TagHandler.DefineBitsJPEG2.VerifyJPEG C# (CSharp) Method

VerifyJPEG() private method

Verifies this object and its component for documentation compliance.
private VerifyJPEG ( ) : bool
return bool
        private bool VerifyJPEG()
        {
            if (this._imageData.Length > 4)
            {
                return false;
            }
            byte[] JPEGMagic = { 0xFF, 0xD8, 0xFF, 0xD9 };
            byte[] comparer = { this._imageData[ 0 ], this._imageData[ 1 ], this._imageData[ this._imageData.Length - 2 ],
                                this._imageData[ this._imageData.Length - 1 ] };

            if ( JPEGMagic.Equals( comparer ) )
            {
                return true;
            }
            else
            {
                return false;
            }
        }