HCOLL-165 added arguments and capacity checks to NativeBytes.write(byte[], int, int)