Ali Ghanavatian
Ali Ghanavatian

Reputation: 496

lwuit.io.Storage clears after closing application

I'm trying to use lwuit.io.Storage, it works fine while application is running (I can do crud) but it's data clears after closing the application. I've considered:

this is my simple "car" class.

any idea what I'm missing / doing wrong here?

thanks in advance

Upvotes: 2

Views: 347

Answers (1)

Ali Ghanavatian
Ali Ghanavatian

Reputation: 496

I got it, that was a stupid mistake,

The problem was in implementing Externalizable inteface, I was calling "Util.writeUTF(name);" in externalize() method, and trying to read it with "stream.readUTF()" in internalize method.

simply replaced "Util.writeUTF(name)" with "stream.writeUTF(name)".

and it worked out.

Upvotes: 2

Related Questions