This discussion is archived
1 Reply Latest reply: Jun 8, 2011 8:11 AM by 796440 RSS

XMLEncoder or Serializable

EdChouaffe Newbie
Currently Being Moderated
Hi guys.

I have been implementing a GUI app and want to persistently save some values to reuse when the application is restarted.
I would like you to give me some tipps on which mechanism is best to achieve this task.

I'm hesitating between XMLEncoder/Decoder or using the ObjectOutputStream.

Best reagrds.

Edmond
  • 1. Re: XMLEncoder or Serializable
    796440 Guru
    Currently Being Moderated
    EdChouaffe wrote:
    Hi guys.

    I have been implementing a GUI app and want to persistently save some values to reuse when the application is restarted.
    I would like you to give me some tipps on which mechanism is best to achieve this task.
    The one that best meets your specific requirements is best.

    Have you read the docs for both, and maybe look at a couple examples or tutorials? If not, why not?

    Do you understand the fundamental differences between them?

    Did you try them both? If not, why not? It's only a few lines of code, and you can hide the implementation behind an interface.

    Did you have specific problems with one or the other?

    Do you have more specific requirements than "save and reload"? If not, I doubt you'll notice a difference between the two.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points