Skip to content

Commit 4266fb4

Browse files
authored
README.md
1 parent b4db983 commit 4266fb4

File tree

1 file changed

+10
-10
lines changed
  • DISTRIBUTED ALGORITHMS/ObjectSerialization(Car scanner)

1 file changed

+10
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Explanation:
2-
Serialization: Converting an object into a byte stream to send it over the network or to save it to a file.
3-
Deserialization: Converting the byte stream back into an object.
2+
- **Serialization: Converting an object into a byte stream to send it over the network or to save it to a file.
3+
- **Deserialization: Converting the byte stream back into an object.
44

55
# Serializing an Object:
6-
Obtain the output stream from the socket to send data to the client.
7-
Create an ObjectOutputStream from the output stream.
8-
Create an instance of the object you want to serialize (e.g., car).
9-
Write the object to the ObjectOutputStream using the writeObject() method.
6+
- **Obtain the output stream from the socket to send data to the client.
7+
- **Create an ObjectOutputStream from the output stream.
8+
- **Create an instance of the object you want to serialize (e.g., car).
9+
- **Write the object to the ObjectOutputStream using the writeObject() method.
1010

1111
# Deserializing an Object:
12-
Obtain the input stream from the socket to receive data from the client.
13-
Create an ObjectInputStream from the input stream.
14-
Read the object from the ObjectInputStream using the readObject() method.
15-
Cast the read object to the appropriate type (e.g., car).
12+
- **Obtain the input stream from the socket to receive data from the client.
13+
- **Create an ObjectInputStream from the input stream.
14+
- **Read the object from the ObjectInputStream using the readObject() method.
15+
- **Cast the read object to the appropriate type (e.g., car).

0 commit comments

Comments
 (0)