I have seen there is no question that specifically reply to this combination of parameters:
Java + memcpy + pointers.
My background of C/C++ is probably biasing me.
In C++ I can do this:
memcpy (Destination, Source, length_data);
and Destination and Source can be just two memory locations.
Is there a way to do it in Java with arrays of primitive types?
All the realizations of
Arrays.copyOf
Arrays.copyOfRange
are basically doing half the job. In the sense that, you can specify the amount of data or a given range, but all of them give back one Array, they do not modify an existing one.
Thanks in advance.
See
System.arraycopy(src, srcPos, dest, destPos, length)