Is there a simple way to downcast an array of integers into an array of bytes?
Essentially, I would like to do the following thing (which does not work as is):
int[] myIntArray = new int[20];
byte[] byteArray = (byte[])myInArray;
The reason for doing this is that in my application myIntArray is actually a byte[], but was declared as an int[]. Meaning that only the least significant byte in myIntArray is of interest.