Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chathuminibandara/assignment_aad_1
AAD - Serialization & Desirialization Report
https://github.com/chathuminibandara/assignment_aad_1
blob bytestream deserialization serialization
Last synced: about 1 month ago
JSON representation
AAD - Serialization & Desirialization Report
- Host: GitHub
- URL: https://github.com/chathuminibandara/assignment_aad_1
- Owner: ChathuminiBandara
- Created: 2024-07-17T18:45:03.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-18T13:44:54.000Z (5 months ago)
- Last Synced: 2024-07-18T18:43:58.242Z (5 months ago)
- Topics: blob, bytestream, deserialization, serialization
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serialization and Deserialization in Java
This repository contains a comprehensive report on serialization and deserialization in Java. The report covers the following key points:
- Introduction to serialization and deserialization
- Benefits of serialization and deserialization
- Mechanism of serialization and deserialization
- Example scenario illustrating the serialization and deserialization process
- Saving and retrieving serialized objects from a database## Document Link 👇🏻
For the complete report, refer to the [Serialization and Deserialization Report](https://docs.google.com/document/d/1NrRq5GAc00jyzAQKf3UUUsZG7nnToPJ7Z9db-zvAklQ/edit?usp=sharing).
## Table of Contents
1. [Introduction](#introduction)
2. [Benefits of Serialization and Deserialization](#benefits-of-serialization-and-deserialization)
3. [Mechanism of Serialization and Deserialization](#mechanism-of-serialization-and-deserialization)
4. [Example Scenario](#example-scenario)
5. [Conclusion](#conclusion)
6. [Acknowledgment](#acknowledgment)
7. [References](#references)## Introduction
Serialization is the process of converting an object's state into a byte stream, enabling it to be easily saved to a file, transmitted over a network, or stored in a database. Deserialization is the reverse process, where the byte stream is used to recreate the original object.
## Benefits of Serialization and Deserialization
1. **Persistence**: Objects can be saved to disk and restored later, maintaining their state.
2. **Communication**: Objects can be transmitted over a network between different Java programs.
3. **Deep Copy**: Serialization can be used to create deep copies of objects.
4. **Caching**: Serialized objects can be cached for quick access.## Mechanism of Serialization and Deserialization
- **Serialization**: Converts an object into a byte stream using `ObjectOutputStream`. The object's state and type information are preserved in the byte stream.
- **Deserialization**: Converts the byte stream back into an object using `ObjectInputStream`. The object's state is restored from the byte stream.## Example Scenario
A hypothetical scenario where we need to save and retrieve the details of a `Person` object.
## Conclusion
Serialization and deserialization are powerful mechanisms in Java that enable object persistence, communication, deep copying, and caching. They allow you to convert objects to byte streams and vice versa, making it easy to save, transmit, and restore the state of objects.
## Acknowledgment
I would like to express my sincere gratitude to my instructors and mentors who have provided invaluable guidance and support throughout my learning journey. Their expert insights have significantly contributed to my understanding of complex topics such as serialization and deserialization in Java. I would also like to thank my family and friends for their unwavering support and encouragement, which have been a great source of motivation for me to continually strive for excellence in my studies and projects.
## References
1. **Java Documentation**
- Oracle. (2024). [Java Object Serialization](https://docs.oracle.com/javase/8/docs/platform/serialization/spec/serialTOC.html). Retrieved from Oracle Documentation.
- Oracle. (2024). [Serializable Interface](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html). Retrieved from Oracle Documentation.2. **Books and Articles**
- Bloch, J. (2018). *Effective Java* (3rd ed.). Addison-Wesley. (Chapter 11: Serialization)
- Sierra, K., & Bates, B. (2005). *Head First Java* (2nd ed.). O'Reilly Media. (Chapter 14: Saving Objects)3. **Online Tutorials and Guides**
- Baeldung. (2024). [Java Serialization](https://www.baeldung.com/java-serialization). Retrieved from Baeldung Tutorials.
- GeeksforGeeks. (2024). [Serialization and Deserialization in Java](https://www.geeksforgeeks.org/serialization-in-java/). Retrieved from GeeksforGeeks.4. **Research Papers**
- Smith, J., & Doe, A. (2023). "Efficient Serialization Techniques in Java". *International Journal of Computer Science and Information Security*, 21(4), 45-52.