What is the Java equivalent of VB's Buffer.BlockCopy?
for (int i = 0; i < num5; i++) {
int[] dst = new int[9];
// Buffer.BlockCopy(bytes, (num2 + &HF8) + (i * 40), dst, 0, 40)
byte[] buffer2 = new byte[dst[4] - 1];
// Buffer.BlockCopy(bytes, dst(5), buffer2, 0, buffer2.Length)
}
Notice the commented out section... I don't know a Java equivalent to put there.
If I understand this properly, I think you want System.arraycopy()
. The JavaDoc for it can be found here.
A quick example would be:
int[] src = new int[3] {1,2,3};
int[] dst = new int[4];
System.arraycopy(src, 0, dst, 0, 3); // Copies all of src into dst starting at zero.
// Dst would be {1,2,3,0}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With