I have a byte[] and would like to copy it into another byte[]. Maybe I am showing my simple \'C\' background here, but is there an equivalent to memcpy() on byte arrays in
If you just want an exact copy of a one-dimensional array, use clone().
byte[] array = { 0x0A, 0x01 }; byte[] copy = array.clone();
For other array copy operations, use System.arrayCopy/Arrays.copyOf as Tom suggests.
System.arrayCopy
Arrays.copyOf
In general, clone should be avoided, but this is an exception to the rule.
clone