DESCRIPTION

JCBC-610: Fix decoding of BinaryDocument

Motivation
----------
BinaryTranscoder currently refuses to decode BinaryDocuments because
TranscoderUtils says that a document with BINARY_COMPAT_FLAGS is not in
fact a binary document. This is a bug to be corrected.

Modifications
-------------
Refactored TranscoderUtils to recognize BINARY_COMPAT_FLAGS as binary.
Added a mask to easily extract the common flags part of a 32bit integer
and implemented unit tests to check behavior of both the hasBinaryFlags
method and the BinaryTranscoder.

Result
------
New tests passes and BinaryDocuments can be correctly identified by the
adequate TranscoderUtils method, thus decoded by the BinaryTranscoder.

Change-Id: I54c5ebfdc555f3a0441c21068f3192fdfdf96d9c
Reviewed-on: http://review.couchbase.org/42597
Tested-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Estrella Humphrey
date: 2014-10-30 11:33:42.787000000

Change has been successfully cherry-picked as 784a5b0870ba4f11c1130dcc48c775bac4543b2e

-------------------------------------
