Android ObjectInputStream and ObjectOutputstream snippet

At first, make your object serializable and let the IDE (in my case Eclipse) generate a serialVersionUID for you:

Writing to files with serialization and writing objects to file:

Reading files with serialization and get it as object:

Thats it!

 

2 thoughts on “Android ObjectInputStream and ObjectOutputstream snippet”

Leave a Reply

Your email address will not be published. Required fields are marked *