filmov
tv
41 - Java Serialization using Externalizable - Theory

Показать описание
@backstreetbrogrammer
--------------------------------------------------------------------------------
Chapter 17 - Java Serialization using Externalizable - Theory
--------------------------------------------------------------------------------
If we want to fully control serialization and override JVM default serialization process, we can implement the Externalizable interface and override its methods writeExternal() and readExternal().
Using Externalizable, complete serialization/deserialization logic becomes developer's responsibility.
We need to tell what to serialize using writeExternal() method and what to deserialize using readExternal().
With implementation of writeExternal() and readExternal(), methods writeObject() and readObject() becomes redundant and do not get called.
We can even serialize/deserialize static and transient variables, although it will be a bad practice to do so.
When an Externalizable object is reconstructed, the object is created using public no-arg constructor before the readExternal() method is called.
If a public no-arg constructor is not present then a InvalidClassException is thrown at runtime.
#java #javadevelopers #javaprogramming #javaserialization
--------------------------------------------------------------------------------
Chapter 17 - Java Serialization using Externalizable - Theory
--------------------------------------------------------------------------------
If we want to fully control serialization and override JVM default serialization process, we can implement the Externalizable interface and override its methods writeExternal() and readExternal().
Using Externalizable, complete serialization/deserialization logic becomes developer's responsibility.
We need to tell what to serialize using writeExternal() method and what to deserialize using readExternal().
With implementation of writeExternal() and readExternal(), methods writeObject() and readObject() becomes redundant and do not get called.
We can even serialize/deserialize static and transient variables, although it will be a bad practice to do so.
When an Externalizable object is reconstructed, the object is created using public no-arg constructor before the readExternal() method is called.
If a public no-arg constructor is not present then a InvalidClassException is thrown at runtime.
#java #javadevelopers #javaprogramming #javaserialization
41 - Java Serialization using Externalizable - Theory
42 - Java Serialization using Externalizable - Code Demo 1
24 - Java Serialization with static fields - Code Demo
01 - Java Serialization Tutorial Series
What is Serialization in Java #shorts #java #interviewpreparation
Serialization in Java | #java #javainterviewquestionsandanswers #shorts
LAMP 41 - Serialization
28 - Java Serialization using writeObject() and readObject() - Theory
Java Serialization Explained | Java IO Tutorial | Java Tutorial
Serialization in Java
Process of serialization in Java when Externalizable interface is used|externalization in java
Serialization #9 - Arrays
P41 - Files in Java | Core Java | Java Programming |
Java - Serialization
transient access modifier, serialization and deserialization in Java.
What is the Transient keyword in Java?
Jackson ObjectMapper from scratch | Convert json string to java object | Convert java object to json
What happens if you try to serialize a static field in Java?
AppSecEU 16 - Christian Schneider, Alvaro Muoz - Surviving the Java serialization apocalypse
Serialization vs Externalization in Java: Serializable vs Externalizable
Java Object Serialization
Mastering Serialization: Using the 'transient' Keyword in Java #javaframework #javaclass #...
Day-14 Java Code Snippet Explanation [Object Serialization - Persistence]
#Tutorials 9 || RestAssured || serialization and deserialization || POJO class
Комментарии