long to byte array conversion (unsigned byte)
843789May 15 2010 — edited May 15 2010Hello,
I found this code to convert a long into a byte array but there is a problem: byte is a signed type so I wonder if it is possible to convert back to a long. Can someone post the right code?
for (k=0;k<8;k++) bytearray[k] = (byte)(index >>> (k * 8));
Thanks in advance