DESCRIPTION

JVCBC-140: Extract buf processing utils and add tests

Motivation
----------
Some methods in QueryHandler could be more generally applied.
Furthermore they lack unit tests.

Modifications
-------------
Compiled them and added a few variants into ByteBufJsonHelper.

Added test for both ByteBufJsonHelper and ClosingPositionBufProcessor,
and refactored QueryHandler to call util methods.

Results
-------
All test pass.

Change-Id: Ib5facbb2147906ccba33b7321fe39df368279af8


COMMENTS

author: Estrella Humphrey
date: 2015-02-05 14:03:51.895000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2015-02-05 14:08:32.286000000

Patch Set 1: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2015-02-05 16:26:51.994000000

Patch Set 1: Code-Review+2

(2 comments)

with a small comment

Line:64, src/main/java/com/couchbase/client/core/endpoint/util/ByteBufJsonHelper.java -> can you utilize findNextChar here?

Line:74, src/main/java/com/couchbase/client/core/endpoint/util/ByteBufJsonHelper.java -> (and here)

-------------------------------------
author: Estrella Humphrey
date: 2015-02-05 16:45:24.749000000

Patch Set 1:

(2 comments)

Line:64, src/main/java/com/couchbase/client/core/endpoint/util/ByteBufJsonHelper.java -> oups here I could have (didn't see your comment before submitting)

Line:74, src/main/java/com/couchbase/client/core/endpoint/util/ByteBufJsonHelper.java -> here no I couldn't have, because I'm using the override with an offset and length (whereas findNextChar just searches from current readerIndex)

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