XMLEncoder and PersistenceDelegate
Posted
by Johannes Rössel
on Stack Overflow
See other posts from Stack Overflow
or by Johannes Rössel
Published on 2010-05-14T12:21:00Z
Indexed on
2010/05/14
12:24 UTC
Read the original article
Hit count: 264
I'm trying to use XMLEncoder
to write an object graph (tree in my case) to a file. However, one class contained in it is not actually a Java bean and I don't particularly like making its guts publicly accessible. It's accessed more like a list and has appropriate add
methods.
I've already written a custom PersistenceDelegate
to deal with that. However, is there any way for XMLEncoder
to pick it up on its own or do I really need to add it whenever I use an encoder to write a graph that may contain said class?
© Stack Overflow or respective owner