I am adding some data to super list and trying to convert that list to byte[], but getting class cast exception. Below is my code.
public byte[] getBytes () {
Byte[] arrayByte = (Byte[])super.toArray();
byte [] bytes = Utility.toPrimitives(arrayByte);
return bytes;
}
Error Log
03-13 11:56:27.480: E/AndroidRuntime(10471): Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.Byte[]