serialize/deserialize a LinkedHashMap (android) java

Posted by user348058 on Stack Overflow See other posts from Stack Overflow or by user348058
Published on 2010-05-23T01:01:44Z Indexed on 2010/05/23 2:20 UTC
Read the original article Hit count: 317

Filed under:
|
|
|

So i want to pass a LinkedHashMap to an intent.

//SEND THE MAP
Intent singlechannel = new Intent(getBaseContext(),singlechannel.class);
singlechannel.putExtra("db",shows1);//perase to
startActivity(singlechannel);

//GET THE MAP
LinkedHashMap<String,String> db = new LinkedHashMap<String,String>();   
db=(LinkedHashMap<String,String>) getIntent().getSerializableExtra("db");

This one Worked Like a charm with HashMap. But with LinkedHashMap i got a problem I got a warning "Type safety: Unchecked cast from Serializable to LinkedHashMap" But i had this warning with HashMap too? Any ideas.Any help is much appreciated

Also I just saw this. https://issues.apache.org/jira/browse/HARMONY-6498

© Stack Overflow or respective owner

Related posts about java

Related posts about android