lecture24

lecture24 - PIC 20A Lecture 24 Object Serialization Threads...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
PIC 20A Lecture 24: Object Serialization, Threads, Multithreading, javax.swing.Timer
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What is object serialization? • the process of saving objects to a stream • it is called serialization because each object is assigned a serial number on the stream • if the same object is saved twice, only the serial number is written out the second time • when objects are read back in, duplicate serial numbers are restored as references to the same object
Background image of page 2
Which objects can be written to an object stream? • those whose classes implement the java.io.Serializable interface • the Serializable interface has no methods • the object's direct superclass must have a non- private default constructor in order for the object's inherited public , protected and package access fields to be serialized and deserialized (else you will get a runtime error)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
• To ensure compatibility between class versions of the serialized and deserialized objects, each serializable class has a unique version ID number
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/12/2010 for the course PIC PIC 20A taught by Professor Keithouellette during the Spring '09 term at UCLA.

Page1 / 17

lecture24 - PIC 20A Lecture 24 Object Serialization Threads...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online