javaserialization.pdf

(277 KB) Pobierz
623018137 UNPDF
Serialization
1
623018137.004.png 623018137.005.png
Topics
What is Serialization?
What is preserved when an object is serialized?
Transient keyword
Process of serialization
Process of deserialization
Version control
Changing the default protocol
Creating your own protocol via Externalizable
2
623018137.006.png
What is
Serialization?
3
What is
Serialization?
623018137.007.png 623018137.001.png
What is Serialization?
Ability to read or write an object to a stream
Process of "flattening" an object
Used to save object to some permanent storage
Its state should be written in a serialized form to a
file such that the object can be reconstructed at a
later time from that file
Used to pass on to another object via the
OutputStream class
Can be sent over the network
4
623018137.002.png
Streams Used for Serialization
ObjectOutputStream
For serializing (flattening an object)
ObjectInputStream
For deserializing (reconstructing an object)
5
623018137.003.png
Zgłoś jeśli naruszono regulamin