0

Hello!

Can someone please suggest a way to effectively copy the bytes from one array to another.
In my program a user will call the method setDate(byte[] buf) which will set data continuously ie
inside the method there is an array say buf2.
for example if the method is called with 2 bytes as argument. then it is copied to buf2.
if again the method is called with 4 bytes as arguments. then data is stored in buf2[2] ... buf2[5] using for loop.
If the argument is of 10000 bytes then the performance is hit. Can you please suggest a faster way or algorithm to copy bytes from one array to another

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by purijatin
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.