Serialization in Java презентация
Содержание
- 2. Object Serialization We all know the Java platform allows us to
- 3. Serializable Class is serializable if It can be transformed to
- 4. Usage RMI Enterprise Java Beans JMS Object Cache (disk storage) Application
- 5. Your own protocol
- 6. The Default Mechanism To persist an object in Java, we must
- 7. Working with ObjectOutputStream and ObjectInputStream ObjectOutputStream.writeObject() // serialize and write ObjectInputStream.readObject()
- 8. Bare-bones example import java.io.*; class Cat implements Serializable { } //
- 9. ?
- 10. Object Graphs What if the instance variables are themselves references to
- 11. What did we forget? import java.io.*; public class SerializeDog { public
- 12. Good news! Only objects marked Serializable can be persisted. These classes are already
- 13. Transient What if we didn't have access to the Collar class
- 14. Using writeObject and readObject When the Dog is deserialized, it comes
- 15. Serialization Is Not for Statics You should think of static variables
- 16. ?
- 17. Create Your Own Protocol: the Externalizable Interface Instead of implementing the Serializable interface,
- 18. Externalizable
- 19. serialVersionID Used when deserialization for deciding if the serialized and loaded
- 20. Links Java Object Serialization Specification Implementing Serializable: best practices
- 21. Скачать презентацию



















Слайды и текст этой презентации
Похожие презентации