In windows, the bitbuffer reads the filechannel. This advances the
position. It needs to be flip()ed to reset reading. This problem will
be obvious when we do CI in windows.
Change-Id: Id1cbf581c993038c54d8aa6fd3a62a77e17f17e3
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/48199
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
if (IS_WIN32) {
byteBuffer = ByteBuffer.allocate((int) size);
fc.read(byteBuffer, position);
+ byteBuffer.flip();
} else {
byteBuffer = fc.map(mode, position, size);
}