> What's the easiest way to append a few extra byte values to the end of an
> existing byte array? Do I have to create a new larger array
Yes
> and copy the old contents one by one using a for() loop?
You can use
System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
instead.

Signature
Thomas
Brian Bagnall - 27 Aug 2006 00:05 GMT
Thanks, Thomas. I'll use that.
>> What's the easiest way to append a few extra byte values to the end of an
>> existing byte array? Do I have to create a new larger array
[quoted text clipped - 4 lines]
> System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
> instead.