Forums Register Login

what is externalization?

+Pie Number of slices to send: Send
I know somewhat about serialization....but what is externalization ...can anybody give nice example...?
2
+Pie Number of slices to send: Send
In Java, a class that is Externalizable has more control over how it is serialized. The serialization mechanism normally determines its own format when it serializes an object, but an object that is Externalizable defines a custom format by manually manipulating the output.


Now, let's make Book Externalizable:

We now have much more control over what data we write and how we write it. The downside is that our members can no longer be final, and we needed to add a no-arg public constructor.
+Pie Number of slices to send: Send
thanks a lot for your huge coding explanation...!
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 503 times.
Similar Threads
Serialization in java
Lightweight vs. Heavyweight objects
about Serializable
serializable object
AnyJ & VSS
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:24:28.