java.lang.classcastExcption
Posted
by Tara Singh
on Stack Overflow
See other posts from Stack Overflow
or by Tara Singh
Published on 2010-04-14T13:45:43Z
Indexed on
2010/04/14
14:03 UTC
Read the original article
Hit count: 180
Hi,
I have an array list of objects in my application.
private static ArrayList<Player> userList=new ArrayList<Player>();
In my application, I am converting this list to byte array and then sending it to other clients. At client When I am trying to cast it back to the ArrayList, its giving me casting error. I am doing this in client side after receiving this list as byte array:
ArrayList<Player> pl = (ArrayList<Player>) toObject(receivedByteArray);
where toObject is my function to convert the byte array to object;
Any Suggestions please !!!
Thanks.
© Stack Overflow or respective owner