set position and limit in getByteBuffer