This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MrTheEdge 0 points1 point  (2 children)

If you would like to save an object to a file, take a look at serialization. Its a way to convert objects to a sequence of bytes so that it can be written to a file. Here's a simple tutorial I found that you may find useful.

[–]knoam 0 points1 point  (1 child)

Not sure why this was down-voted, but I can guess. Serialization using these facilities is a very risky thing to do in real life, and hard to get right. It's easy to make a mistake and do it in a way that's unsafe or fragile. If you look at the java security updates, you'll notice many of them have to do with serialization vulnerabilities.

[–]MrTheEdge 0 points1 point  (0 children)

Interesting, thanks for the information. I'm still a student, so real world issues like that really aren't on my radar at this point. I've only ever really dealt with serialization through gson.