[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Appending Bytes To A Byte Array
left shifting the array???
System.arraycopy is your friend here.
Hen
On Thu, 19 Dec 2002, Gregory A. Lusk wrote:
> I'm sure there is an easy way to do this:
>
> I am trying to define a method that accepts a byte array as input and
> appends 3 bytes to it (little endian) - just a simple encoding process.
> What is the preferred way to do this? I thought about just
> re-dimensioning the size of the array to include the three new bytes,
> left shifting the array by three bytes, then setting the values. Is
> there an easier way?
>
> Thanks,
>
> Greg Lusk
>
>