i would like to copy the contents of a byte array to a long variable. my code looks like this:
long key = 0;
for (i = 0; i < 8; i++) {
key <<= 8;
key |= (long)(buffer[i]); //<- this line causes the problem
}
however, when i run the program, there is an error message saying "unable to handle exception". what may have cause this problem?