ByteArrayObjectDataOutput when writing to an explicit location in a buffer fixed
(cherry picked from commit 2e3fef3)
Merge pull request #2727 from jerrinot/my/bugs/BufferObjectDataOutput/backport-3.x

3.x backport - ByteArrayObjectDataOutput when writing to an explicit location