Question on Serialzation

When i serialized an object i stored its state into a text file.When i checked out the contents of that file it contains a myriad of printable as well as non-printable characters.Is there any format of a file as such where i can see how it stores the state of the object,in the sense in textual printable representation or can someone please tell me as to the exactly the way the state is stored in the file

Regards

Quest

[441 byte] By [qUesT_foR_knOwLeDgea] at [2007-11-26 14:52:04]
# 1
No (you cant make serialized objects write out in a "readable" way).You CAN find the specification online though.
TuringPesta at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...
# 2
You can use xstream or java.beans.XMLEncoder/Decoder instead of the default serialization mechanism. Or you could google for a tool to inspect serilized objects.
jverda at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...
# 3

> You can use xstream or java.beans.XMLEncoder/Decoder

> instead of the default serialization mechanism. Or

> you could google for a tool to inspect serilized

> objects.

Unforunately i am going the conventional way reading the book on java although i loathe conformity and i am still a bit far from the chapter that covers java.beans.So the first options ruled out till i am through with the api sorrounding.I will check out for the tools to insoect serialized objects on google.Thanks jeff

qUesT_foR_knOwLeDgea at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...
# 4
> although i loathe conformity good luck with that.
TuringPesta at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...
# 5
> although i loathe conformity Remind me why you are using java then ?
Aknibbsa at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...
# 6

> No (you cant make serialized objects write out in a

> "readable" way).

> You CAN find the specification online though.

correct me if i am wrong, but i believe you can make serialized objects write out in a readable way.

you have to override their serialization methods, and in those methods write to streams stuff that you can read, but the write and read methods have to work together.

this wont work if you want to serialize existing classes which you cannot modify.

mkoryaka at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...
# 7

> > although i loathe conformity

> Remind me why you are using java then ?

Because he mistakenly and stubbornly has the idea that software development (in Java in this case) is the right fit for him. I've tried to warn him of the mistake to save him from pain down the road, but there's only so much I can do.

warnerjaa at 2007-7-8 8:40:19 > top of Java-index,Java Essentials,New To Java...